All rights reserved, please indicate the source when citing
ps - Display Process Status
The ps(processes status) command displays basic information about processes.
The basic syntax of the ps command is ps [OPTIONS].
Some commonly used options include:
-a:Display all running processes, including those of other users.
-u:Display detailed user-oriented information, such as usernames, CPU usage, etc.
-x:Display processes without controlling terminals.
-e:Display all processes, equivalent to the "-A" option.
-f:Display full-format listing, including parent processes and additional information.
-l:Display long-format listing with detailed information, including partial resource usage.
Examples:
$ seq 1 1000000←List numbers from 1 to 1000000
1
2
3
4 Ctrl+Z←Press <Ctrl+Z> to pause the current program
[1]+ Stopped seq 1 100000000
$ tar -Jcvf file.tar.xz /etc &> /dev/null &← Run 'tar' to archive and 'xz' to compress in the background
[2] 14859
$ ps←Display process status
PID TTY TIME CMD
14683 pts/0 00:00:00 bash
14829 pts/0 00:00:00 seq ←Process stopped
14859 pts/0 00:00:00 tar ←Background 'tar' process
14866 pts/0 00:00:02 xz ←Background 'xz' process
14867 pts/0 00:00:00 ps
For more ps examples, explanations, options, you can refer to the provided link.