How to detatch a program from the terminal

Sometimes, when you start a program from the terminal, closing the terminal will also close the program. Even if you start the program in the background. vlc does this. E.g. Start vlc with vlc &, close the terminal and vlc will also close.

To prevent this you can detatch the process from the terminal using the nohup command:

nohup vlc &

References: How do I detach a process from Terminal, entirely?

Last modified: 14/06/2012 Tags: ,

This website is a personal resource. Nothing here is guaranteed correct or complete, so use at your own risk and try not to delete the Internet. -Stephan

Site Info

Privacy policy

Go to top