Ctrl-c, Ctrl-z, ctrl-d differences in Linux

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

In Linux:

ctrl-c: (Kill foreground process) sending SIGINT signals to all processes in the foreground process group, forcing the execution of the program to terminate;

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

FG command resumes execution of suspended in the foreground. can be used at this time. ctrl-z suspend the process again, BG command resumes execution of a suspended process in the background, which will not be available at this time ctrl-z again suspend the process;

A more common feature:

When editing a file using VI, you need to execute the shell command to query for some required information, you can use ctrl-z to suspend VI , such as execution FinishShellcommand and then useFGRecoveryVIcontinue editing your files (of course, you can alsoVIused in! Commandmode of executionShell Lifemake,butis not convenient for this method).

ctrl-d: (Terminate input, or exit shell) A special binary value that represents EOF, which is equivalent to entering exit in the terminal to enter ;

Here are a few more:

ctrl-/ Send Sigquit signals to all processes in the foreground process group, terminates the foreground process and generates Core file

ctrl-s Interrupt Console output

ctrl-q Recovery Console output

ctrl-l Clear Screen

in fact, control characters are all available through Stty command changes, you can enter commands in the terminal "Stty-a" View Terminal configuration

Ctrl-c, Ctrl-z, ctrl-d differences in Linux

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.