fg
process managementLinux/Unix
The fg command is one of the most frequently used commands in Linux/Unix-like operating systems. fg Move job to the foreground
Quick Reference
Command Name:
fg
Category:
process management
Platform:
Linux/Unix
Basic Usage:
fg [options] [arguments]
Common Use Cases
Syntax
fg [job_spec]
Options
Job Specification | Description |
---|---|
%n |
Job number n |
%str |
Job whose command begins with str |
%?str |
Job whose command contains str |
%% |
Current job |
%+ |
Current job (same as %%) |
%- |
Previous job |
Examples
How to Use These Examples
The examples below show common ways to use the fg
command. Try them in your terminal to see the results. You can copy any example by clicking on the code block.
# Basic Examples Basic
fg