1.

What is the difference between ctrl+z and ctrl+c?

Answer»

When we have a process in progress which handle your prompt, there were some signals (orders) that we can SEND to theses process to indicate what we need:

Control+C sends SIGINT which INTERRUPTS the application. Usually causing it to abort, but a process is able to INTERCEPT the signal and do whatever it likes: for instance, from the Bash prompt, try Ctrl-C. In Bash, it cancels whatever you've typed and gives you a blank prompt (as opposed to the quitting Bash)

Control+Z sends SIGTSTP to foreground application, EFFECTIVELY putting in the BACKGROUND on suspended mode. This is very much useful when we want the application to continue its process while we are doing another job in the current shell. When we finish the job, we can go back into the application by running FG (or %x where x is the job number as shown in jobs).



Discussion

No Comment Found