Fg command on Linux (processes in the foreground)
The fg command on Linux does the exact opposite of the bg command, placing the task or background process in the foreground and connected to a terminal.
It also accepts that a job number is passed as a parameter.
In this example again the find command is placed in the background with Ctrl-Z and it gains the number of Job1:
To view programs running in the background, the jobs command can be executed:
To return the Job to the foreground and connected to the terminal, simply run fg. In this example, the Job number was passed as a parameter:
Learn much more about Linux in our online course. You can register here. If you already have an account, or want to create one, just log in or create your user here.
Did you like it?
Share