ctrl+key

>Usage

Control keys are used to manage job operations directly from the terminal. The combination of Control and key is a keyboard shortcut that involves pressing the Control key along with another key to execute specific commands or actions. These shortcuts, known as control sequences, allow for quick management of processes, navigation, and text editing directly from the keyboard, eliminating the need for more lengthy commands.

>Synopsis

ctrl key

>Options

+Z

Sends the SIGTSTP signal to the current foreground process, suspending it. The job can be resumed with fg or bg. If you have job 1 running, you can stop it by pressing Control and the key Z.

Example 1:

Dots

-zsh

> ^Z


[1]+ Stopped sleep 100

+C

Sends the SIGINT signal to the current foreground process, which terminates currently running foreground job. Commonly used for stopping scripts or commands that run indefinitely like, for example, ping google.com.

Example 2:

Dots

-zsh

> ^C


[1]+ Stopped ping google.com

+D

Sends an EOF (end-of-file) signal to the terminal and indicates the end of input or exits the shell.

Example 3:

Dots

-zsh

> ^D


This exits the terminal or ends the current shell session.

+S

Not commonly used but helpful if you want to pause the scrolling output of a command. This is helpful if text is scrolling too quickly like, for example, for the command ls -l. Resume with Ctrl+Q.

Example 4:

Dots

-zsh

> ^S


Pauses the output.

+Q

Resumes output to the terminal after being paused with Ctrl+S.

Example 5:

Dots

-zsh

> ^Q


Resumes the output paused by the command Ctrl+S.

+\

Used for a more forceful termination that Ctrl+C. Useful for debugging or killing unresponsive programs. It can be applied if you have, for example, an infinite loop command such as while true; do echo "Running..."; done.

Example 6:

Dots

-zsh

> ^\


^\Quit (core dumped)

>Quiz

Progress: Question ? out of ?

Question Title

Page written by Sofia Mamone