Operations 12 min read

20 Essential Linux Terminal Tricks to Boost Your Productivity

This article presents a curated collection of practical Linux command‑line shortcuts and tips—ranging from tab completion and directory navigation to log monitoring and command chaining—that can dramatically reduce keystrokes, prevent common errors, and streamline everyday system‑administration tasks.

Efficient Ops
Efficient Ops
Efficient Ops
20 Essential Linux Terminal Tricks to Boost Your Productivity

Here are several useful Linux commands, terminal tricks, and shortcuts that can save a lot of time when using the Linux command line.

These techniques are valuable not only for beginners but also for experienced Linux users who may have missed them.

1. Use Tab for autocomplete

Press the Tab key while typing a command to see possible completions that start with the characters you have entered.

cp l<TAB>

2. Switch back to the previous directory cd - This returns you to the last working directory without typing the full path.

3. Return to the home directory cd ~ or simply

cd

4. List directory contents

Instead of ls -l, many Linux distributions support the shortcut:

ll

5. Run multiple commands in one line command_1; command_2; command_3 6. Run the next command only if the previous one succeeds command_1 && command_2 Example: sudo apt update && sudo apt upgrade 7. Search your command history

Press Ctrl + r and type a keyword to perform a reverse search.

ctrl + r keyword

8. Unfreeze a frozen terminal

Press Ctrl + Q to resume after Ctrl + S has frozen the terminal.

9. Jump to line start or end

Use Ctrl + A for the beginning and Ctrl + E for the end of the line.

10. Follow a log file in real time

tail -F linuxidc_log

11. Read compressed logs without decompressing

Use the z suite (e.g., zless, zcat, zgrep) to view gzip‑compressed files directly.

zcat linuxidc_log.zip | more

12. Use less to read files less -N linuxidc.txt 13. Reuse the last argument of the previous command

Use !$ or Alt + . to insert the last argument.

14. Repeat the previous command with !!

Useful for quickly re‑executing a command with sudo:

sudo !!

15. Create aliases to fix typos alias gerp=grep 16. Copy and paste in the terminal

Use mouse selection + right‑click, middle‑click, or Ctrl+Shift+C/V depending on the client.

17. Terminate a running command

Press Ctrl + C.

18. Empty a file without deleting it > filename 19. Search for a string inside files grep -Pri "search_string" /path 20. Use the built‑in help for any command bc -help These tips work on most Linux distributions and shells without requiring additional tools.

Original Source

Signed-in readers can open the original source through BestHub's protected redirect.

Sign in to view source
Republication Notice

This article has been distilled and summarized from source material, then republished for learning and reference. If you believe it infringes your rights, please contactadmin@besthub.devand we will review it promptly.

linuxproductivitycommand-lineterminal
Efficient Ops
Written by

Efficient Ops

This public account is maintained by Xiaotianguo and friends, regularly publishing widely-read original technical articles. We focus on operations transformation and accompany you throughout your operations career, growing together happily.

0 followers
Reader feedback

How this landed with the community

Sign in to like

Rate this article

Was this worth your time?

Sign in to rate
Discussion

0 Comments

Thoughtful readers leave field notes, pushback, and hard-won operational detail here.