Putting a process in the background without stopping it - (ctrl+z)?
Yes, absolutely: screen(1) is the answer.
To get started, add screen -R
to ~/.bash_profile or equivalent, log out, and log back in.
To continue what's running in the background, press Control-A then N. This will create a new terminal screen in the foreground while seamlessly continuing your running process on the background.
Press Control-A then " to get an interactive list of screens that you have open, or press Control-A then a number to switch directly to a specific screen.
Your original requirement was to be able to move a process to the background without stopping it. Screen has two additional benefits, and these are huge if you like to do multiple things at once:
- You can switch between processes much more fluidly than by using Control-Z, bg, fg, etc.
- If your terminal session gets disconnected, your processes (like
wget http://example.com/bigfile.iso
) will NOT terminate! All of your shell sessions will be there waiting for you when you reconnect.
For more information, read the screen(1) manpage, or the GNU Screen Manual.