Which signal does ctrl-x send when used in a terminal? Which signal does ctrl-x send when used in a terminal? linux linux

Which signal does ctrl-x send when used in a terminal?


To get all the terminal control character assignments:

stty -a


There is possibly a misunderstanding. CtrlC does not generate a signal. It is perfectly possible to press CtrlC anywhere, and no bad things will happen (for example in every text editor or word processor, that's the de-facto-standard for "copy").

However, when you run a program in the shell, then your keypresses really go into the shell, not into your program. The shell will forward (almost) everything to your program's stdin, and forward anything coming from stdout to either the terminal or another process or a file (if you used a pipe or redirection).

If the shell sees you press CtrlC, then the shell sends the interrupt signal. But that's really just something the shell does, not something that magically happens because of the key combination.

About CtrlX, you probably meant CtrlZ. This stops a process, and the shell outputs a number which you can use with fg to make it run again.


From Wikipedia

Ctrlx Ctrle : Edits the current line in the $EDITOR program, or vi if undefined.

Ctrlx Ctrlr : Read in the contents of the inputrc file, and incorporate any bindings or variable assignments found there.

Ctrlx Ctrlu : Incremental undo, separately remembered for each line.

Ctrlx Ctrlv : Display version information about the current instance of bash.

Ctrlx Ctrlx : Alternates the cursor with its old position. (C-x, because x has a crossing shape).

One additional usage of Ctrlx is to expand the * when typing a command in the shell.

Say you have:

$ ls *

Pressing Ctrlx and then * will expand * to all items in the current directory to something like this:

$ ls dir1 dir2 file1 file2 file3`

You can also refer to this topic on SuperUser for the usage I described above.