Ask Question
19 December, 15:22

Write a command that will start and run the gedit command in the background.

+5
Answers (1)
  1. 19 December, 15:51
    0
    The command is gedit &

    Explanation:

    The command gedit tells the shell (the program that takes keyboard commands and carries them to the operating system) to run gedit (a text editor) and the ampersand symbol (&) suspends (or makes the program run in the background).

    This can be understood from a historical perspective. In the 1980s, most users have only a terminal and can run only a program at once. They could suspend the current program using Ctrl-Z (or run the program in the background), and do some other tasks in the while.

    Later, to check which job (or process) was suspended, they wrote the command jobs, which tells the user that the suspended ones (or running in the background) were those jobs inside square brackets ([number-of-the-job]), that is, the jobnumber, assigned to that command (in this case, the command would be gedit, although it was not available at that time since its initial release was in 1999).

    Then, to run again that suspended process, they wrote the command fg (foreground) followed by (%) and the jobnumber, so they were able to continue with the suspended job (or running-in-the-background job).

    This a legacy of Unix-like systems and it is still in use nowadays.

    So, to run gedit in the foreground, or run it again, it suffices to write the command fg followed by % and the jobnumber that corresponds to the aforementioned program, that is, gedit.

    By the way, you can suspend gedit using Ctrl-Z in the terminal and run it again following all the instructions aforementioned.
Know the Answer?
Not Sure About the Answer?
Find an answer to your question ✅ “Write a command that will start and run the gedit command in the background. ...” in 📘 Computers and Technology if you're in doubt about the correctness of the answers or there's no answer, then try to use the smart search and find answers to the similar questions.
Search for Other Answers