Other times when you start a program from the terminal it needs the terminal will be occupied all the time while you are using it.
Not so anymore.
I came over a tip today that will detach your command from the terminal and run in the background. I update all my computers from one box with Salt
and it is convenient to simply run that in the background.
Yes I could do it with a Cron-job but sometimes I want to watch what happens so it is not an option to automate it completely.
So I start it with
Code: Select all
sudo salt '*' pkg.upgrade
..and hit CTRL+Z to abort it immediately.
Then I simply type
Code: Select all
bg
Code: Select all
[1] + continued sudo salt '*' pkg.upgrade
After it has finished it will display the status of the update in the terminal - it's quite handy!
Here is a test that you can run:
1 Start Firefox in a terminal
2 Break it off with CTRL+Z
3 Type bg in the terminal
Now you can surf on the internet and type commands in the terminal as you like.
If you want to see what jobs you have running in the background simply type:
Code: Select all
jobs
here is how it looks in the terminal:
http://showterm.io/624f6d03bf11f9c3a87bd