How To Run Commands In Backgroud?

How to run commands in background when you logout?
Ans :
Actually in Linux/nix we cant run the commands in background when we logged out.

Let me put in this way by taking an example :
Supose you have logged in to a remote system by using ssh so you want to run a process background though you have logged out ? This can be achived by using the nohup command. Below is the man help for nohup.

No Hang Up. Run a command immune to hangups, runs the given command with hangup signals ignored, so that the command can continue running in the background after you have logged out.

SYNTAXnohup Command [Arg].
`nohup' increases the scheduling priority of COMMAND by 5, this gives a slightly lower priority. If standard output is a terminal, it and standard error are redirected so that they are appended to the file `nohup.out'; if that cannot be written to, they are appended to the file `$HOME/nohup.out'. If that cannot be written to, the command is not run.

  • Like the post? Please Subscribe to free RSS feed to get updates
  • Related Posts by Categories



    Translate this page


    The Linux Juggernaut | Copyright 2006-2009 Surendra Kumar Anne | Surendra's Home Page | Give us feedback how we are doing, Click here