Friday 20 January 2017

How to keep sub processes on a terminal running after the terminal has been closed

At times I find myself running commands such as:

tail -f /var/log/messages &


tcpdump -i enp0s25 port 25 -w out.pcap

Which allows me to carry on debugging problems while I can see any stdout on my terminal.

Although these commands spawn sub-processes - that are attached to the (parent) terminal process.

The other day I came accross a pretty cool command that will allow me to leave these commands running - effectively releasing them from the parent process - so I can terminate the shell:

disown -a && exit


Post a Comment