Linux and Unix fg command

Quick links

About fg
Syntax
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.

Syntax

fg [ %job_id ]

Options

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

Examples

fg

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.

Related commands

bg
csh
kill
ksh
ps
sh
stop