Fundamentals 11 min read

11 Must‑Know Linux Terminal Tricks to Supercharge Your Workflow

Discover 11 powerful Linux terminal shortcuts and commands—from essential key bindings and sudo tricks to background execution, process management, and YouTube video downloading—that can dramatically boost productivity, simplify routine tasks, and help you master the command line efficiently.

Liangxu Linux
Liangxu Linux
Liangxu Linux
11 Must‑Know Linux Terminal Tricks to Supercharge Your Workflow

This article presents a curated list of eleven practical Linux terminal tricks that can greatly improve everyday command‑line productivity.

1. Everyday Command‑Line Shortcuts

Useful key bindings include:

CTRL + U – delete text before the cursor

CTRL + K – delete from cursor to end of line

CTRL + Y – paste previously cut text

CTRL + E – move cursor to end of line

CTRL + A – move cursor to start of line

ALT + F – jump forward to next word

ALT + B – jump backward to previous word

ALT + Backspace – delete the previous word

CTRL + W – delete the word after the cursor

Shift + Insert – paste text from the clipboard into the terminal

These shortcuts speed up editing and navigation of long commands.

2. Using sudo !! to Re‑run the Previous Command as Root

If you type a command that fails with “Permission denied”, you can simply run sudo !!. The !! expands to the previous command, so the line becomes, for example: sudo apt-get install ranger This avoids re‑typing the entire command.

3. Pausing a Job and Returning It to the Foreground

Press CTRL + Z to suspend the current foreground process. The shell returns to the prompt, allowing you to run other commands. When you are ready to resume, type fg to bring the suspended job back to the foreground.

4. Running Commands After Logout with nohup

When connected via SSH, nohup lets a long‑running command continue after you disconnect. Example:

nohup wget http://mirror.is.co.za/mirrors/linuxmint.com/iso/stable/17.1/linuxmint-17.1-cinnamon-64bit.iso &

The command keeps running even after the SSH session ends.

5. Scheduling Commands with at

The at utility runs a command at a specified future time. Example:

at 10:38 PM Fri
at> cowsay 'hello'
Ctrl‑D

After entering the time and command, press CTRL + D to finish. The command will execute at the given time.

6. Enhancing man Pages

You can improve the appearance of manual pages by setting a different pager, e.g., export PAGER=most after installing most. Adjust line width with export MANWIDTH=80 and open a man page in a browser with man -H (requires the BROWSER environment variable).

7. Managing Processes with htop

Install htop to get an interactive, color‑rich process viewer similar to Windows Task Manager. Run it simply with: htop Within htop you can sort, filter, and kill processes using function keys.

8. Browsing Files with ranger

ranger

provides a terminal‑based, two‑pane file manager. After installing, start it with: ranger Navigation uses arrow keys: left moves to the parent directory, right enters a selected directory. Consult its man page for additional shortcuts.

9. Canceling a Pending Shutdown

If you accidentally schedule a shutdown, you can abort it with: shutdown -c Note that if the shutdown sequence has already begun, cancellation may not succeed. An alternative is:

pkill shutdown

10. Quickly Killing a Hung Process

Use ps -ef or htop to locate a stuck process, then kill it. A faster graphical method is xkill —run xkill and click the offending window.

11. Rebooting a Frozen System with REISUB

When the system is unresponsive, hold Alt and SysRq and press the keys in the sequence R E I S U B. This safely restarts the machine without using the power button.

12. Downloading YouTube Videos

Install youtube-dl from your package manager and download a video with: youtube-dl url-to-video Copy the video URL from the YouTube share link and paste it into the command (you can use Shift + Insert to paste).

These eleven tips provide a solid toolbox for everyday Linux terminal work, helping you edit commands faster, manage processes, schedule tasks, and even retrieve media.

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.

productivitycommand-lineshortcutsterminallinux-commands
Liangxu Linux
Written by

Liangxu Linux

Liangxu, a self‑taught IT professional now working as a Linux development engineer at a Fortune 500 multinational, shares extensive Linux knowledge—fundamentals, applications, tools, plus Git, databases, Raspberry Pi, etc. (Reply “Linux” to receive essential resources.)

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.