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.
Syntax
fg [ %job_id ]
Options
Examples
fg
Typing fg will resume the most recently suspended or backgrounded job.
- Syntax
- Examples
- Related commands
- Linux commands help
fg 1
Brings the job with the id 1 into the foreground, resuming it if it was suspended.
Related commands
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.