The Top 15 Linux Pipes You’ll Love (and Actually Use)

June 2025 | By John @ LinuxEveryday.online

In Linux, pipes (|) are more than just syntactic sugar—they’re the reason why command-line workflows are so darn powerful. Pipes let you take the output of one command and send it as input to another, chaining together tools like Lego bricks. You get to create entirely new commands!

Here are 15 pipes you’ll love—not because they’re fancy, but because they’re practical and battle-tested.


🚀 1. ps aux | grep processname

Find if a process is running. Simple. Effective.

ps aux | grep sshd

🔎 2. netstat -tuln | grep :22

Check if a port is open. Substitute ss for modern distros.

ss -tuln | grep :80

📄 3. du -sh * | sort -h

Figure out what’s hogging disk space—sorted.

cd /var/log && du -sh * | sort -h

🧼 4. dmesg | less

Scrollable system boot and kernel logs.

dmesg | less

🐛 5. journalctl -xe | grep ssh

Search for relevant log entries, usually around errors.

journalctl -xe | grep fail

🔁 6. find . -type f | xargs wc -l

Count lines across every file in a directory tree.

find . -name "*.py" | xargs wc -l

📦 7. ls -lt | head -n 10

See your 10 most recently modified files.

ls -lt ~/Downloads | head -n 10

🔐 8. cat /etc/passwd | cut -d: -f1

List all usernames on the system.

cat /etc/passwd | cut -d: -f1

🧾 9. grep -i error /var/log/syslog | tail -n 20

Show recent errors from system logs.

grep -i error /var/log/syslog | tail -n 20

📊 10. df -h | grep '^/dev'

Filter disk usage only for mounted filesystems.

df -h | grep '^/dev'

🛠 11. ip a | grep inet

Quick IP address lookup.

bashCopyEditip a | grep inet

📈 12. top -b -n1 | head -n 20

Snapshot of current system activity. Great for logs.

top -b -n1 | head -n 20

🧰 13. lsblk | grep part

See physical disks and partitions at a glance.

lsblk | grep part

🔍 14. awk '{print $1}' file.txt | sort | uniq -c | sort -nr

Word frequency, log analysis, or quick metrics.

awk '{print $1}' /var/log/auth.log | sort | uniq -c | sort -nr

🔄 15. cat file | tr '[:upper:]' '[:lower:]' | sort | uniq

Clean up a messy text file into unique, lowercase lines.

cat names.txt | tr '[:upper:]' '[:lower:]' | sort | uniq

💡 Final Thoughts

These pipes aren’t about showing off—they’re about getting things done the Linux way: lean, fast, and powerful. Whether you’re managing logs, analyzing processes, or inspecting systems, there’s a good chance one of these will end up in your .bash_history.

👉 Got a favorite pipe combo not listed here? Drop me a line and let’s build a bigger toolkit—together!