Foreground and Background Processes
Foreground and Background Processes
To make a process to run in background, use & at the end of command.
To bring this process to foreground, use 'fg'.
To run a process in foreground, simply run the command.
To send this process to background, first stop this process using 'ctrl+z'. then use 'bg' command. stopped process ll continue in background.
- Code:
$ sleep 10&
To bring this process to foreground, use 'fg'.
- Code:
$ fg
To run a process in foreground, simply run the command.
- Code:
$ sleep 10
To send this process to background, first stop this process using 'ctrl+z'. then use 'bg' command. stopped process ll continue in background.
- Code:
$ bg
Permissions in this forum:
You cannot reply to topics in this forum
|
|