Linux command
systemctl-status 命令
文本
复制后可按需替换文件名、目录或参数。
常用示例
Example
systemctl status [unit].service
Example
systemctl status
Example
systemctl status [unit1] [unit2]
Example
systemctl status [pid]
Example
systemctl status -n [50] [unit]
Example
systemctl status --user [unit]
说明
systemctl status displays the current state of systemd units including services, sockets, targets, and timers. It shows whether units are active, enabled, or have failed, along with recent log entries from the journal. Without arguments, it shows an overview of system state. With a unit name, it provides detailed status including the main PID, memory usage, control group, and recent log lines.
参数
- --user
- Query user service manager instead of system
- -n, --lines=_NUM_
- Number of journal lines to show
- -o, --output=_MODE_
- Journal output mode (short, verbose, json, etc.)
- --no-pager
- Do not pipe output to pager
- -l, --full
- Do not ellipsize unit names, process tree entries, or journal output
FAQ
What is the systemctl-status command used for?
systemctl status displays the current state of systemd units including services, sockets, targets, and timers. It shows whether units are active, enabled, or have failed, along with recent log entries from the journal. Without arguments, it shows an overview of system state. With a unit name, it provides detailed status including the main PID, memory usage, control group, and recent log lines.
How do I run a basic systemctl-status example?
Run `systemctl status [unit].service` in a terminal, then adjust file names, paths, flags, or remote targets for your system.
What does --user do in systemctl-status?
Query user service manager instead of system