What Does Fg Do in Linux?
Contents

The fg command moves a background job in the current shell environment into the foreground.

How do you use the fg command?

You can use the fg command to bring a background job to the foreground. Note: The foreground job occupies the shell until the job is completed, suspended, or stopped and placed into the background. Note: When you place a stopped job either in the foreground or background, the job restarts.

What is fg terminal?

The fg command is like bg command except that instead of sending a command in the background, it runs them in the foreground and occupies the current terminal and waits for the process to exit. … As the command is running in the foreground, we don’t get back the terminal until command exits.

James H. Sterling

James H. Sterling

Environmental Science & Climate Journalist

James Sterling reports on renewable energy developments, climate policy, ecological conservation, and green tech innovations around the globe.

Share this article
Twitter Facebook Pinterest