25 Ubuntu Terminal Shortcuts for Productivity Boosting
Let’s face it, whether you're a daily Terminal user or just getting started, shaving seconds off your command-line tasks can add up to serious productivity gains. So here’s a handy list of 25 Ubuntu Terminal shortcuts to help you navigate, execute, and manage your workflow faster and smarter.
1. Clear the Screen Without Leaving
Easily clear your Terminal display with CTRL + L
, a far cleaner and faster option than typing clear
every time.
2. Zap Everything on the Line Before the Cursor
Need a clean slate? CTRL + U
erases everything before the cursor, leaving you with just what you need to finish the command.
3. Wipe After the Cursor
CTRL + K
is like CTRL + U
, but in the opposite direction. This shortcut deletes everything from the cursor onward, perfect for quick edits on the fly.
4. Jump to the Start
The quickest way to the beginning of your command is with CTRL + A
. It’s a lifesaver for editing commands that went a bit too long.
5. Jump to the End
Similarly, CTRL + E
scoots you right to the end of your command, sparing you a long journey with the arrow key.
6. Skip by Words
ALT + F
to jump forward and ALT + B
to jump back lets you navigate commands by words rather than letter-by-letter, making editing much faster.
7. Delete the Word Before the Cursor
Perfect for quick corrections, CTRL + W
deletes the last word on the left, letting you retype it right away.
8. Yank It Back
If you’ve cut something with CTRL + U
or CTRL + W
, CTRL + Y
will paste it back in. Think of it as a quick "undo."
9. Reverse Search Your Command History
Type CTRL + R
and start entering a command fragment to instantly search your command history—a fantastic way to avoid repetitive typing.
10. Run the Last Command
Forget sudo
last time? Simply type sudo !!
to rerun the last command as a superuser.
11. Run the Most Recent Command by a Specific Name
Want to rerun the last grep
command? Just type !grep
and hit Enter to summon it instantly from your history.
12. Insert the Last Argument of the Previous Command
If you need the last argument from your previous command, ESC + .
is a fast way to insert it, saving you a bit of typing.
13. Suspend Processes
When multitasking, CTRL + Z
pauses the current process and sends it to the background. Use fg
to resume it in the foreground when ready.
14. Manage Background Processes
After suspending a job, bring it back to the foreground with fg
, or let it keep running in the background with bg
.
15. Cancel a Command
CTRL + C
is your "escape hatch" to stop the command that’s currently running, ideal for quick exits when you need to start fresh.
16. Exit the Terminal
Tap CTRL + D
to close the current Terminal session. It’s faster than typing exit
or reaching for the close button.
17. Autocomplete Like a Pro
Start typing a command or path, hit TAB
, and let the Terminal autocomplete it if there’s only one possibility.
18. Cycle Through Last Arguments
Similar to ESC + .
, but ALT + .
cycles through arguments from previous commands, not just the most recent one.
19. View Command History
Need a refresher on what you ran earlier? Type history
to see a list of your past commands.
20. Open New Terminal Window
For quickly launching a fresh Terminal session, CTRL + ALT + T
is your go-to shortcut, especially when juggling multiple sessions.
21. Comment Out a Line
Use ALT + #
to add a #
at the start of a line, helpful for making comments directly in your scripts.
22. Freeze and Unfreeze the Screen
CTRL + S
freezes the Terminal display, and CTRL + Q
unfreezes it. Use carefully to avoid accidental screen freezes.
23. Open Command in an Editor
Need more room to type? CTRL + X
followed by CTRL + E
will open your command in your default text editor.
24. Substitute and Run
Want to rerun a previous command with a quick edit? !!:gs/<old>/<new>
lets you replace any part of it instantly.
25. Cancel Reverse Search
If you start a reverse search with CTRL + R
and want to exit, CTRL + G
lets you gracefully cancel without hassle.
These shortcuts are here to help streamline your Terminal time, making your workflow faster and a lot more efficient. So navigate the command line like a pro. And save keystrokes and boost productivity.