Linux and Unix fg command

Quick links

About fg
Syntax
Examples
Related commands
Linux and Unix main page

About fg

Continues a stopped job by running it in the foreground, some shells are not able to run this command.

Syntax

fg [%job]

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

Examples

fg

Typing fg alone will resume the first job were it was left off.

fg 1

Specifying the job (in this case 1) will resume that particular job. The job id can be determined by running the bg command.

Related commands

bg
csh
kill
ksh
ps
sh
stop