What's different between Ctrl+Z and Ctrl+C in Unix command line?
Problem
I'm using Mac OS X Terminal. And I use Ctrl+Z or Ctrl+C to stop some programs. But I realized that I don't know what they're exactly doing. What are they and what's the difference between them? This question was a Super User Question of the Week. Read the March 13, 2011 blog entry for more details or submit your own Question of the Week.
Unverified for your environment
Select your OS to check compatibility.
1 Fix
Fix for: What's different between Ctrl+Z and Ctrl+C in Unix command line?
Control+Z is used for suspending a process by sending it the signal , which cannot be intercepted by the program. While Control+C is used to kill a process with the signal , and can be intercepted by a program so it can clean its self up before exiting, or not exit at all. If you suspend a process, this will show up in the shell to tell you it has been suspended: However, if you kill one, you won't see any confirmation other than being dropped back to a shell prompt. When you suspend a process,…
Awaiting Verification
Be the first to verify this fix
Sign in to verify this fix