Table of Contents

Linux Process Management

ps

An example of a good general purpose process listing including a long formatted date-time of the start time of the command and the elapsed time since the process was started.

ps -eo pid,lstart,etime,cmd:128
ps -ef | grep -i "[f]oobar"
ps -ejH

disown

When a process is started from a bash shell the process is a child of the shell and when the terminal session ends the child will be sent a signal that will result in the process being terminated. To prevent this the bash disown -ha command can be used to cause the child process to not receive the signal. As a result the process will remaining running after the terminal session ends.

nohup

nohup runs the specified program so that it will not receive a hang-up signal when the terminal exists. Therefore the program will continue running like a daemon.

nohup python /path/to/script.py &