Shortcuts For Command-Line Ninjas

Shortcuts For Command-Line Ninjas

ยท

2 min read

Nowadays, I spend more time in the Terminal. I'm learning some useful shortcuts to get things done faster. Here are some of those shortcuts.

Ctrl + a => Go to the beginning of a line.
Ctrl + e => Go to the end of a line.
Alt + b => Move backward one word.
Alt + f => Move forward one word.

Cutting & Pasting

Ctrl + k => Delete all after the cursor.
Ctrl + u => Delete all before the cursor.
Ctrl + w => Delete one word before the cursor.
Ctrl + y => Paste deleted caracters.

(tips: use Alt + b to move anywhere you want and use Ctrl + k to delete all words after the cursor.)

Others

!! => Repeats the last command.
Ctrl + h => If you don't want to use the BACKSPACE key.
Ctrl + j => If you don't want to use the ENTER/RETURN key.
Alt + u => Capitalize all characters in a word after the cursor.
Alt + l => Uncaptalize all characters in a word after the cursor.
Ctrl + l => Clears the screen and redisplay the line.
history => To see the past command you used. To use those command type ! before the command number.

(tips: use Alt + b and Alt + u to Capitalize a word before the cursor. The same goes for Alt + l)