The fg instruction is one of the commonly used instructions under Linux. The fg instruction is used to switch the background or suspended tasks (or jobs) to the foreground.
'FG' explanation: foreground
Description: If job control is enabled (refer to "Job Control in Korn Shell" in AIX 5L V5.2 System User Guide: Operating System and Devices), the fg command moves background jobs in the current environment to the foreground. Use the JobID parameter to indicate the specific job to run in the foreground. If this parameter is not provided, the fg command uses the job that was recently suspended in the background or runs as a background job.
Purpose: The fg instruction is used to switch the background or suspended tasks (or jobs) to the foreground. If there are multiple commands in the background, you can use the fg + background job bow command to transfer to the foreground to continue running. 
Syntax: fg [JobID]
The JobID parameter can be the identification number of the process, or you can use the following symbol combination:
%Number refers to the job by job number.
%String refers to a job whose name starts with a specific string.
%?String refers to a job whose name contains a specific string.
%+ OR %% refers to the current job.
%- Reference to the previous job.
Using the fg command to bring a job to the foreground will cause the identifier of the job process to be removed from the list, which is known to those in the current shell environment. 
The /usr/bin/fg command does not work when operating in its own command execution environment because there is no suitable job available in this environment. For this reason, the fg command is executed as a regular built-in command in the Korn or POSIX shell.
The following export values are returned:
0 Successfully ended.
>0 An error occurred.
If job control is disabled, the fg command will exit with an error and no job will be placed in the foreground.
If the output of the job -l command shows the following jobs running in the background:
 + 16477 RunningSleep 100 &
You can use the process identifier to run the sleep 100 & command in the foreground, just enter:
The screen will display:
/usr/bin/ksh contains Korn shell fg built-in commands.
/usr/bin/fg contains the fg command.
Scope of application: Red Hat, RHEL, Ubuntu, CentOS, SUSE, openSUSE, Fedora
bg: Put the job (or task) in the background.
Jobs: Display shell job information.
FPGA Spartan-IIE Family 50K Gates 1728 Cells 400MHz 0.15um Technology 1.8V 144-Pin TQFP
FPGA Spartan-3E Family 500K Gates 10476 Cells 657MHz 90nm Technology 1.2V 132-Pin CSBGA
FPGA Spartan-XL Family 5K Gates 238 Cells 217MHz 3.3V 100-Pin VTQFP