In most Unix-like operating systems, ps is a program that displays the currently running processes. ps has many options. On operating systems that support the UNIX and POSIX standards, ps is commonly run with the options -ef, where "-e" selects every process and "-f" chooses the "full" output format. Another common option on these systems is -l, which specifies the "long" output format. Most systems derived from BSD fail to accept the POSIX and UNIX standard options because of historical conflicts (for example, the "e" or "-e" option will cause environment variables to be displayed). On such systems, ps is commonly used with the non-standard options aux, where "a" lists all processes on a terminal, including those of other users, "x" lists all processes without controlling terminals and "u" adds the controlling user for each process. Note that, for maximum compatibility when using this syntax, there is no "-" in front of the "aux". Also you can add 'www' after aux, like "ps auxwww" for complete information about the process including all params. Another Unix utility named top provides a real-time view of the running processes.
Examples
An example of the ps command is:
tux ~ # ps PID TTY TIME CMD 7431 pts/0 00:00:00 su 7434 pts/0 00:00:00 bash 18585 pts/0 00:00:00 ps
The ps command can also be used in conjunction with the grep command to find information about one process, such as its process id. An example of this is:
tux ~ # ps -A | grep firefox-bin 11778 ? 02:40:08 firefox-bin 11779 ? 00:00:00 firefox-bin
See also
External links
- : report a snapshot of the current processes – Linux User's Manual
- The ps Command - by The Linux Information Project (LINFO)
|
|
|
|---|---|
| File and file system management | alias · cat · chattr · cd · chmod · chown · chgrp · cksum · cmp · cp · du · df · file · fsck · fuser · ln · ls · lsattr · lsof · mkdir · mount · mv · pwd · rm · rmdir · split · touch |
| Process management | at · chroot · crontab · exit · kill · killall · nice · pgrep · pidof · pkill · ps · pstree · sleep · time · top · wait · watch |
| User management/environment | env · finger · id · logname · mesg · passwd · su · sudo · uname · uptime · w · wall · who · whoami · write |
| Text processing | awk · comm · cut · ed · ex · fmt · head · iconv · join · less · more · paste · sed · sort · tac · tail · tr · uniq · wc · xargs |
| Shell programming | basename · echo · expr · false · printf · test · true · unset |
| Printing: lp · Communications: inetd · netstat · ping · rlogin · nc · traceroute · Searching: find · grep · strings · Miscellaneous: banner · bc · cal · dd · man · size · yes | |


