Linux ctrl-c, ctrl-z, ctrl-d difference __linux

Source: Internet
Author: User
Tags clear screen control characters exit in

In Linux:


ctrl-c: (kill foreground process) sends SIGINT signals to all processes in the foreground process group, enforcing the termination of the program;

ctrl-z: (suspend foreground process) sends SIGTSTP signals to all processes in the foreground process group, often used to suspend a process, and

Non-end processes, users can use the FG/BG operation to recover the process of performing a foreground or background. FG command resumes execution of suspended feed in foreground

, you can use Ctrl-z to suspend the process again, and the BG command resumes execution of the suspended process in the background, and the ctrl-z is not available at this time

Suspend the process again;

A more common feature:

Using VI to edit a file, you need to execute the shell command to query some of the required information, you can use ctrl-z suspend VI, etc. after the execution of shell command and then use FG Restore VI continue to edit your file (of course, you can also use in VI.) command to execute shell commands,

But this method is not convenient).

ctrl-d: (Terminate input, or exit shell) a special binary value, indicating EOF, the role of the equivalent of entering exit in the terminal after carriage return;


There are several more:


ctrl-/ sends sigquit signals to all processes in the foreground process group, terminating the foreground process and generating core files

ctrl-s Interrupt Console output

ctrl-q Recovery Console output

ctrl-l Clear Screen


In fact, control characters can be changed through the Stty command, you can enter the command "STTY-A" in the terminal to view the terminal configuration




Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.