Fg

From LQWiki
Jump to: navigation, search

Fg

Fg stands for foreground, and is used to bring a job to foreground in the shell. If a task is in foreground you of course cannot use the shell, and at best are interacting with the program, or are watching output.

Example Usage

hostname:~# fg 2

The above example would bring to the foreground which ever application was running in the "jobspec" of number 2.

To get a list of the current applications running you would us the jobs command. Each running application will have a job number or "jobspec" associated with it.

See Also

See bg for sending a task to background, so you can use your shell. Also see jobs to see what jobs are currently active in the current shell.