Open main menu
Home
Random
Recent changes
Special pages
Community portal
Preferences
About Wikipedia
Disclaimers
Incubator escapee wiki
Search
User menu
Talk
Dark mode
Contributions
Create account
Log in
Editing
Ps (Unix)
(section)
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
==Examples== <syntaxhighlight lang="console"> # 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 </syntaxhighlight> Users can [[Pipeline (Unix)|pipeline]] <code>ps</code> with other commands, such as [[Less (Unix)|less]] to view the process status output one page at a time: <syntaxhighlight lang="console"> $ ps -A | less </syntaxhighlight> Users can also utilize the <code>ps</code> command in conjunction with the <code>[[grep]]</code> command (see the <code>[[pgrep]]</code> and <code>[[pkill]]</code> commands) to find information about a single process, such as its id:<syntaxhighlight lang="console"> $ # Trying to find the PID of `firefox-bin` which is 2701 $ ps -A | grep firefox-bin 2701 ? 22:16:04 firefox-bin </syntaxhighlight> The use of <code>[[pgrep]]</code> simplifies the syntax and avoids potential race conditions: <syntaxhighlight lang="console"> $ pgrep -l firefox-bin 2701 firefox-bin </syntaxhighlight> To see every process running as root in user format: <syntaxhighlight lang="console"> # ps -U root -u USER PID %CPU %MEM VSZ RSS TT STAT STARTED TIME COMMAND root 1 0.0 0.0 9436 128 - ILs Sun00AM 0:00.12 /sbin/init -- </syntaxhighlight>
Edit summary
(Briefly describe your changes)
By publishing changes, you agree to the
Terms of Use
, and you irrevocably agree to release your contribution under the
CC BY-SA 4.0 License
and the
GFDL
. You agree that a hyperlink or URL is sufficient attribution under the Creative Commons license.
Cancel
Editing help
(opens in new window)