Run your commands / scripts even when you logout of your system

Nohup is short for “No Hangups.” It’s not a command that you run by itself. Nohup is a supplemental command that tells the Linux system not to stop another command once it has started. That means it’ll keep running until it’s done, even if the user that started it logs out. The syntax for nohup is simple and looks something like this:
nohup ./ &
Because nohup can keep running independently of the user that started it, the command needs somewhere to output any messages or errors. Since there isn’t a terminal to associate with it, nohup logs everything to an output file, nohup.out.

By default, that file is located in whichever directory you started the command in.

You can have your predefined file to log this output. The syntax would be like
nohup ./ >> /pathto/your/dir/myscriptoutput.log &

3 thoughts on “Run your commands / scripts even when you logout of your system

  • April 6, 2019 at 2:10 am

    Wonderful website. Plenty of useful information here. I’m sending it to several friends ans also sharing in delicious. And of course, thanks for your effort!

  • June 9, 2019 at 5:18 pm

    This design is incredible! You definitely know how to keep a reader entertained.

    Between your wit and your videos, I was almost moved to start my own blog (well, almost…HaHa!) Wonderful job.
    I really loved what you had to say, and more than that,
    how you presented it. Too cool!


Leave a Reply

Your email address will not be published. Required fields are marked *