The fg command allows us to continue a stopped operation by running it in foreground.
The command name stands for foreground.


The default fg command syntax is:
fg [%job_number]
The parameter [%job_id] contains the job number you wish to run in foreground. If this is not indicated, the command will run the last stopped operation.

Stop a working job

To stop the execution of a command so that it can be later resumed with fg you need to press the ctrl + Z keys. The job number to be used with the fg command will be printed.
[1]  + NNNN suspended  top