DEV Community

Cover image for Shortcuts For Command-Line Ninjas
Mahabubur Rahman
Mahabubur Rahman

Posted on • Originally published at microrony.hashnode.dev

1

Shortcuts For Command-Line Ninjas

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.

Navigation

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)

AWS GenAI LIVE image

How is generative AI increasing efficiency?

Join AWS GenAI LIVE! to find out how gen AI is reshaping productivity, streamlining processes, and driving innovation.

Learn more

Top comments (0)

Sentry image

See why 4M developers consider Sentry, “not bad.”

Fixing code doesn’t have to be the worst part of your day. Learn how Sentry can help.

Learn more

👋 Kindness is contagious

Please leave a ❤️ or a friendly comment on this post if you found it helpful!

Okay