Sunday, March 6, 2011

nohup linux command

When working with the UNIX operating system, there will be times when you will want to run commands that are immune to log outs or unplanned login session terminations.  This is especially true for UNIX system administrators.  The UNIX command for handling this job is the nohup (no hangup) command.

Normally when you log out, or your session terminates unexpectedly, the system will kill all processes you have started.  Starting a command with nohup counters this by arranging for all stopped, running, and background jobs to ignore the SIGHUP signal.

The syntax for nohup is:

nohup command [arguments]
You may optionally add an ampersand to the end of the command line to run the job in the background:

nohup command [arguments] &

No comments:

Post a Comment