Linux command line shortcut

Move cursor

command Operation explanation
Ctrl + b Move one character backward
Ctrl + f Move one character forward
Ctrl + a Move to the beginning of the line
Ctrl + e Move to the end of line
Alt + b Move one word backward
Alt + f Move one word forward

Delete and insert

command Operation explanation
Ctrl + h Delete one character behind
Ctrl + d Delete one character at the cursor position
Ctrl + w Delete one word at the end separated by a space
Ctrl + k Delete (cut) from the cursor position to the end of the line
Ctrl + u Delete (cut) from the cursor position to the beginning of the line
Ctrl + y Insert the last deleted content (Yank)

Screen operation

command Operation explanation
Ctrl + s Lock screen display
Ctrl + q Unlock screen display
Ctrl + c Forcibly terminate the command being executed
Ctrl + l Delete the history displayed on the screen

Command history search

command Operation explanation
Ctrl + p Move to the previous command history
Ctrl + n Move to the next command history
Ctrl + r Start incremental search

Incremental search (Ctrl + r)

command Operation explanation
Character input Add a search term and search again
Ctrl + r Move to the previous search result
Enter Run current search results as is
Esc Return to command line with current search results displayed
Ctrl + g Discard the search results and return to the prompt
Enter Run current search results as is

Incremental search Example of searching with "ec"

(reverse-i-search)`ec': echo hello world

References: New Linux textbook (written by Hideaki Miyake and Yusuke Ohsumi)

Recommended Posts

Linux command line shortcut
Linux command # 4
Linux command # 3
Linux command # 5
Linux command list
linux at command
[Linux] Search command
Linux command <Basic 2>
Linux server command
Linux # Command Memo 1
Linux command [read]
Linux Command Summary
[Basic] linux command
Linux [shell command]
[Linux] Command / Knowledge
My linux command
Linux command <Basic 1>
Linux command collection
Linux mkdir command
Linux command basics
[Linux] Git command
Linux (command memory)
Frequently used command line shortcut keys (Mac)
[Linux] Volume configuration command
Command line introductory notes
Linux command cheat sheet
Linux command (sequential update)
Linux basic command memorandum
Linux command [File operation]
[Linux] Basic command summary
How to create a shortcut command for LINUX
Linux command for self-collection
linux command error collection 1
Open Chrome version of LINE from the command line [Linux]
Multiply PDF by OCR on command line on Linux (Ubuntu)
(Remember quickly) How to use the LINUX command line
linux sar command CPU usage
[Linux] tar.gz compression / decompression command
What is Linux? [Command list]
Linux a summary shortcut key
Twitter post from command line
Easy df command on Linux
Linux tar xz command memo
linux: create original Terminal command
[Note] Useful linux command collection
Linux command memorandum [for beginners]
Linux PC spec check command
[Linux] User / group command summary
Search for large files on Linux from the command line
[Infrastructure] Linux command, shell script collection
[Linux convenient command] Try inserting exa
Command line tool for Chainer ChainerCMD
Command to create Linux Live USB
Slice notation with command line options
[Linux] OS recovery with restore command
Completion of docker command on Linux
[Linux convenient command] Try inserting csview
Permission and ownership change command [Linux]
Linux command [ldconfig] LPIC learning memo
Convenient shortcut keys for Linux commands! !! !!