Linux and Unix fg command

fg commandAbout fg
fg syntax
fg examples
Related commands
Linux and Unix main page

About fg

In Linux, UNIX and any other POSIX-compliant operating system, the fg command continues a stopped job by running it in the foreground.

fg syntax

fg [ %job_id ]


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

fg examples


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.