answersLogoWhite

0

What is the use of fg command?

Updated: 12/24/2022
User Avatar

Wiki User

11y ago

Best Answer

Hmm... "fg" is a bash shell built-in command so I'm assuming you are referring to it. All it does is "resume" the referenced job (or task if you prefer) in the foreground of the shell thus making it the current job (or task). Of course, "fg" is only applicable to a job started with job control enabled.

In Unix and Linux shells that support job control, jobs may be suspended, moved to the background, moved to the foreground and suspended or paused jobs may be resumed. You could, I suppose, compare it to using a mouse to bring jobs into and out of focus on a GUI. I don't use GUIs a lot so I'm not sure how simple it is to suspend a job or task on a Windows system thus causing the task to cease being processed until it is resumed. It is trivial to do from within a bash shell however.

Also, job control in Unix/Linux shells is not restricted to bash, sh, ksh, csh and many if not most other shells support job control. [JMH]

User Avatar

Wiki User

11y ago
This answer is:
User Avatar

Add your answer:

Earn +20 pts
Q: What is the use of fg command?
Write your answer...
Submit
Still have questions?
magnify glass
imp
Related questions

How do you use the bg and fg commands?

bg is used to run a command in background and fg bring the background command to foreground.


What type of power steering fluid do you use for a 2009 fg xr8 ute?

fg power steering fluid


Use of 'FG'command in Linux?

To resume a command, process, application that has been previous suspended. Most commonly used when a command has been executed and suspended (executed with '&' at the end of the command). You may also suspend execution of a program with CTRL-Z (^Z)----$> top &[1]+ 26637$> top &[2] 26642[1]+ Stopped top$>[2]+ Stopped top$> jobs[1]- Stopped 26637[2]+ Stopped 26642$> fg 2[output of the second top]----The + sign displayed by the output of the jobs command refers to the current running process and the - sign refers to the previously running process.


What are the piano notes for auld lang syne?

C f ef a g fg agf f a cd dc aa fg fg agf dd c f dc aa fg fg dc aa cd dc aa fg fg agf dd c f


How do you bring a job to the foreground in Linux?

fg [job id]where [job id] is the job number associated with the process. You can find the job id by issuing the jobs command.


How much is a 14k fg ring?

14k fg wedding band


What is the weight of a 1kg bag of sugar on earth?

Fg=mg therefore Fg=(1.0kg)x(9.81m/s^2) Fg=9.81N


How to use router rip command?

use of routerrip command


To move to the root directory use the command?

For Unix/Linux, use the command 'cd /' For Windows, you can also use the same command or 'cd \'


Which command we use to see MS-DOS version?

You can use "ver" command.


What command do you use to change your password on a Unix system?

Use the command 'passwd'


If angle 3 is 33 and arc FD is 60 what is the measure of arc FG?

FG = 6 :)