14
Jun/092
Jun/092
Linux: View and manage processes running in the background
To view all processes:
ps aux
Search for a process by name:
pgrep <string> | xargs ps
To view all processes, line by line (hit enter to view the next process, hit q to exit):
ps aux | less
To view every process:
ps -A or ps -e
All processes running by a user:
ps -u username
All processes except the ones running by root:
ps -U root -u root -N
To kill a process, either find the process name and type:
kill -9 processname
or kill the process ID (PID):
kill pid
Stop/suspend a process:
ctrl-z
Push a job to run in the background:
fg pid
Related posts:
Enjoy this article?
Please, insert a valid App ID, otherwise your plugin won't work correctly.
Comments (2)
Trackbacks (0) ( subscribe to comments on this post )
Leave a comment
No trackbacks yet.

1:07 AM on May 22nd, 2011
Mozilla/5.0 (Windows NT 6.1; rv:2.0.1) Gecko/20100101 Firefox/4.0.1
I think the last command is to bring back the process to foreground
7:56 AM on November 24th, 2011
Mozilla/5.0 (X11; Linux i686) AppleWebKit/535.2 (KHTML, like Gecko) Chrome/15.0.874.121 Safari/535.2
thank you for this useful codes