14
Jun/09
2

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:

  1. Linux: Release port 8080 after stopping Tomcat – Port 8080 in use by Java

Tagged as:
You are not authorized to see this part
Please, insert a valid App ID, otherwise your plugin won't work correctly.
Comments (2) Trackbacks (0)
  1. sudheer
    1:07 AM on May 22nd, 2011
    Firefox 4.0.1 Firefox 4.0.1 Windows 7 Windows 7
    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

  2. zülfü
    7:56 AM on November 24th, 2011
    Google Chrome 15.0.874.121 Google Chrome 15.0.874.121 GNU/Linux GNU/Linux
    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

Leave a comment

No trackbacks yet.

Plugin from the creators of Brindes Personalizados :: More at Plulz Wordpress Plugins