How to run nohup without generating nohup.out

Question: When I use nohup, I do not want to have nohup.out file generated. How can I run nohup without nohup.out file?

By default, nohup command redirects its output to nohup.out. If you want to run nohup without creating nohup.out, you can simply redirect nohup output to /dev/null as follows.

$ nohup some_command > /dev/null 2>&1&
Download this article as ad-free PDF (made possible by your kind donation): 
Download PDF

Subscribe to Ask Xmodulo

Do you want to receive Linux related questions & answers published at Ask Xmodulo? Enter your email address below, and we will deliver our Linux Q&A straight to your email box, for free. Delivery powered by Google Feedburner.


Support Xmodulo

Did you find this tutorial helpful? Then please be generous and support Xmodulo!

Leave a comment

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