Operations 8 min read

10 Little‑Known Linux Commands That Supercharge Your Workflow

This article introduces a collection of lesser‑known Linux commands—such as sudo !!, python -m SimpleHTTPServer, mtr, Ctrl+x+e, nl, shuf, ss, last, curl ifconfig.me, tree, and pstree—explaining their purpose and providing concise usage examples to help both beginners and seasoned administrators work more efficiently.

MaGe Linux Operations
MaGe Linux Operations
MaGe Linux Operations
10 Little‑Known Linux Commands That Supercharge Your Workflow

Linux command line enthusiasts typically know around 50‑60 commands, but many useful commands remain obscure. This guide presents several hidden gems that can streamline daily tasks on desktops or servers.

1. sudo !!

When a command fails due to insufficient privileges, you can prepend sudo !! to re‑execute the last command with root rights without re‑typing it.

sudo apt-get update

2. python -m SimpleHTTPServer

Launch a quick HTTP server that serves the current directory on port 8000, useful for sharing files locally.

python -m SimpleHTTPServer

3. mtr

mtr

combines the functionality of ping and traceroute. Install it with sudo apt-get install mtr (Debian/Ubuntu) or yum install mtr (Red Hat) and run mtr google.com to view real‑time network paths.

4. Ctrl+x+e

Pressing Ctrl+x e in the shell opens the last command in your default editor (vi, vim, nano, etc.) for quick modifications before execution.

5. nl

The nl command adds line numbers to a file. Example:

# cat one.txt fedora debian arch slack suse # nl one.txt 1 fedora 2 debian 3 arch 4 slack 5 suse

6. shuf

Randomly shuffle lines or file names. Example: ls | shuf -n1 picks a random entry from the current directory.

7. ss

ss

displays socket statistics, offering more detailed TCP state information than netstat. Running # ss lists sockets with columns for state, receive queue, send queue, local address, and peer address.

8. last

The last command reads /var/log/wtmp to show a history of user logins, including login and logout times and the originating TTY.

9. curl ifconfig.me

Retrieve your external IP address directly from the terminal with curl ifconfig.me. Ensure the curl package is installed via your package manager.

10. tree

Display the directory structure in a tree‑like format using tree. Example output shows nested folders and files with indentation.

11. pstree

Show all running processes in a hierarchical tree view, similar to tree, helping you understand parent‑child relationships among services.

These commands provide powerful shortcuts and insights for everyday Linux administration and development tasks.

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.

Shellcommand-lineUnixSystem Administration
MaGe Linux Operations
Written by

MaGe Linux Operations

Founded in 2009, MaGe Education is a top Chinese high‑end IT training brand. Its graduates earn 12K+ RMB salaries, and the school has trained tens of thousands of students. It offers high‑pay courses in Linux cloud operations, Python full‑stack, automation, data analysis, AI, and Go high‑concurrency architecture. Thanks to quality courses and a solid reputation, it has talent partnerships with numerous internet firms.

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.