You can use
nohup to start a command that will not hangup when the shell exits. In this example, output goes to
output.log, errors to
error.log:
Code:
nohup foo >output.log 2>error.log &
You can use the bash command
disown to do the same thing with an existing process, eg:
Code:
foo >output.log 2>error.log &
disown
Or you can use GNU
screen to create a terminal that can be disconnected/reconnected at will.