Which key combination stops a foreground process so it can be sent to the background?

Study for the OSCP Linux Exam. Use our flashcards and multiple-choice questions to test your skills. Each query comes with detailed hints and explanations to enhance your preparedness. Get ready to conquer the exam!

Multiple Choice

Which key combination stops a foreground process so it can be sent to the background?

Explanation:
Suspending a foreground process uses the shell’s job control and a stop signal. Pressing Ctrl+Z sends a stop signal (SIGTSTP) to the currently running process, which pauses it without killing it. This releases control of the terminal back to the shell, and the paused job can then be moved to the background with bg or brought back to the foreground with fg. In contrast, Ctrl+C sends a termination signal (SIGINT) and ends the process, so it isn’t suitable here. Bringing a job to the foreground with fg wouldn’t stop it in the first place, and bg requires the process to already be stopped to run in the background.

Suspending a foreground process uses the shell’s job control and a stop signal. Pressing Ctrl+Z sends a stop signal (SIGTSTP) to the currently running process, which pauses it without killing it. This releases control of the terminal back to the shell, and the paused job can then be moved to the background with bg or brought back to the foreground with fg. In contrast, Ctrl+C sends a termination signal (SIGINT) and ends the process, so it isn’t suitable here. Bringing a job to the foreground with fg wouldn’t stop it in the first place, and bg requires the process to already be stopped to run in the background.

Subscribe

Get the latest from Passetra

You can unsubscribe at any time. Read our privacy policy