Linux terminal shortcuts
There are many shortcuts in the Linux command line, such as Ctrl + l to clear the screen, Ctrl + C to interrupt the command, Ctrl + Z to pause the command, etc. After mastering these shortcuts, you will find that using the command line in Linux becomes more convenient and simpler.
The Linux console is a system console internal to the Linux kernel (a system console is the device which receives all kernel messages and warnings and which allows logins in single user mode). The Linux console provides a way for the kernel and other processes to send text output to the user, and to receive text input from the user. The user typically enters text with a computer keyboard and reads the output text on a computer monitor. The Linux kernel supports virtual consoles – consoles that are logically separate, but which access the same physical keyboard and display.[3] The Linux console (and Linux virtual consoles) are implemented by the VT subsystem of the Linux kernel, and do not rely on any user space software. This is in contrast to a terminal emulator, which is a user space process that emulates a terminal, and is typically used in a graphical display environment.
- ↑ or Ctrl + p displays the previous command
-
↓ or Ctrl + n to display the next command
-
→ or Ctrl + f to move the cursor one character to the right
-
← or Ctrl + b moves the cursor one character to the left
-
Alt + f cursor to the right
-
Alt + b cursor one word to the left
- Ctrl + r search backward for commands that include the input string. Continue pressing Ctrl + r, then search up again. Use Ctrl + c to interrupt the command.
-
Ctrl + s search forward for commands that include input font strings, the same usage as Ctrl + r
-
Ctrl + a cursor to the beginning
-
Ctrl + l clear screen
- Ctrl + u cut all characters before the cursor
- Ctrl + k cut all characters after the cursor
-
Ctrl + w cut the word before the cursor (space, punctuation, etc. as separators)
-
Ctrl + y Paste
-
Ctrl + c interrupt command
-
Ctrl + s suspend the current shell
-
Ctrl + q re-enable a suspended shell
- Ctrl + Z to pause the command
- Alt + u capitalize the word at the cursor (from the cursor to the end of the word)
- Alt + l convert the word under the cursor to lowercase (from the cursor to the end of the word)
-
Alt + c capitalize the word at the cursor (from the cursor to the end of the word)