Start Linux Command in Background and Detach Process in Terminal

How to Start a Linux Process or Command in Background

If a process is already in execution, such as the tar command example below, simply press Ctrl+Z to stop it then enter the command bg to continue with its execution in the background as a job.

You can view all your background jobs by typing jobs. However, its stdin, stdout, stderr are still joined to the terminal.

1
2
3
4
5
6
7
sudo rsync Templates/* /var/www/html/files/ &
$ jobs
$ disown -h %1
# or
$ disown -a

$ jobs
1
2
$ nohup tar -czf iso.tar.gz Templates/* &
$ jobs