Linux fg command

Updated: 05/04/2019 by Computer Hope
fg command

On Unix-like operating systems, the fg shell command continues a stopped job by running it in the foreground.

This page covers the bash built-in version of fg.


fg [ %job_id ]


%job_id Specifies the job that you want to run in the foreground.



Typing fg will resume the most recently suspended or backgrounded job.

fg 1

Brings the job with the id 1 into the foreground, resuming it if it was suspended.

bg — Resume a suspended program without bringing it to the foreground.
csh — The C shell command interpreter.
kill — Send a signal to a process, affecting its behavior or killing it.
ksh — The Korn shell command interpreter.
ps — Report the status of a process or processes.
sh — The Bourne shell command interpreter.
stop — Stop a running job.