nohub and & seem to have a similar effect on the surface, they both start processes without occupying the shell from which they have been started, how do they differ on a deeper level?
- command will be immune to hangup signals
- Runs without a tty
nohup - run a command immune to hangups, with output to a non-tty
- Command is placed in the backgroud
- You can still get back to the command (from same shell) using 'fg'
If a command is followed by a & and job control is not active, the default standard input for the command is the empty file /dev/null. Otherwise, the invoked command inherits the file descriptors of the calling shell as modified by redirections