Jobs and Background Execution

fg

Brings a shell job to the foreground.

fg resumes or moves a job into the foreground so it receives terminal input and control.

Syntax
fg [%job]

Arguments explained

  • %job is an optional shell job number from jobs output.

Common examples

Return to the latest job
fg

Brings the current job back to the foreground.

Foreground a specific job
fg %1

Moves job number 1 into the foreground.

fg Command
FieldDetails
Commandfg
CategoryJobs and Background Execution
Primary useBrings a shell job to the foreground.
Syntaxfg [%job]