Backgrounding Processes
Processes run from the command line in a shell such as bash can be placed in to the background in 2 ways:
1. Placing an '&' after the command. This starts to process in the background automatically.
2. Press Control+Z (Ctrl+Z) after the job has started. This gives you the chance to enter any text you may need to, before moving on. By Pressing Ctrl+Z, you actually suspend the process. Typing 'bg' will background the process.
You can bring a process back in to the foreground by typing 'fg'.
If you have multiple jobs running in the background, you can view them by typing 'jobs'. To bring a job in to the foreground (which was not the last one), use 'fg %' the is the same one listed in the output from the 'jobs' command.
1. Placing an '&' after the command. This starts to process in the background automatically.
2. Press Control+Z (Ctrl+Z) after the job has started. This gives you the chance to enter any text you may need to, before moving on. By Pressing Ctrl+Z, you actually suspend the process. Typing 'bg' will background the process.
You can bring a process back in to the foreground by typing 'fg'.
If you have multiple jobs running in the background, you can view them by typing 'jobs'. To bring a job in to the foreground (which was not the last one), use 'fg %
Labels: administration, shell, tips, UNIX
0 Comments:
Post a Comment
Links to this post:
Create a Link
<< Home