What Does Ctrl Z Do When a Process Is Running from a Linux Terminal?
Contents

The ctrl-z sequence suspends the current process. You can bring it back to life with the fg (foreground) command or have the suspended process run in the background by using the bg command.

What does Ctrl Z do in Linux terminal?

Ctrl+Z – suspend the current foreground process. This sends the SIGTSTP signal to the process. You can get the process back to the foreground later using the fg process_name (or %bgprocess_number like %1, %2 and so on) command. Ctrl+C – interrupt the current foreground process, by sending the SIGINT signal to it.

When you press Ctrl Z what signal is sent to a process?

Ctrl + Z is used to suspend a process by sending it the signal SIGTSTP , which is like a sleep signal, that can be undone and the process can be resumed again.

Sarah Jenkins

Sarah Jenkins

Senior Technology Editor & AI Specialist

Sarah Jenkins is a veteran tech journalist with over 12 years of experience covering artificial intelligence, mobile innovations, and digital ethics. Her insights have appeared in leading technology publications worldwide.

Share this article
Twitter Facebook Pinterest