
10 Useful Linux Commands You’ve Probably Overlooked
- 5 mins10 Useful Linux Commands You’ve Probably Overlooked
The Linux command line is full of small but mighty tools that often go unnoticed. While most users stick with common utilities like ls
, grep
, or top
, there are lesser-known commands that can help you debug, automate, monitor, and streamline your workflow more effectively.
Here’s a curated list of powerful yet underutilized Linux commands—with examples to help you get started.
1. strace
– Watch What a Program is Doing Behind the Scenes
strace
allows you to observe all the system calls a program makes. Great for debugging, performance tuning, or understanding program behavior.
# For Debian-based distributions like Ubuntu
sudo apt-get install strace
# For RPM-based distributions like CentOS
sudo yum install strace
strace ls
strace -e openat curl https://google.com
Common Uses:
- Trace why a program isn’t working.
- See which config files or libraries are accessed.
- Monitor file permissions or missing dependencies.
2. disown
– Keep Jobs Running After Closing the Terminal
Run a command in the background and prevent it from being terminated when you log out(SSH).
some_command & disown
Detach all background jobs:
disown -a && exit
Also try:
jobs # List running jobs
disown %1 # Disown job number 1
Use nohup
as an alternative to avoid disconnection:
nohup long_script.sh &
3. Terminal Clock Using tput
, sleep
, and date
Display a live clock in the top-right corner of your terminal:
while sleep 1; do tput sc; tput cup 0 $(($(tput cols)-29)); date; tput rc; done &
Adjust 29
to fit your terminal size. This command won’t interfere with your normal shell usage.
4. ASCII Clock with watch
+ figlet
Make your terminal fun and functional by turning it into a digital clock.
watch -t -n 1 "date +%T | figlet"
Install figlet if needed:
sudo apt install figlet # Debian/Ubuntu
sudo dnf install figlet # RHEL/Fedora
5. host
& dig
– DNS Lookup Utilities
Use these to troubleshoot DNS issues or gather domain info.
host
host google.com
host 8.8.8.8
dig
dig google.com
dig +short github.com
Why use them:
- Discover IPs and DNS records.
- Diagnose slow domain resolution.
- Perform reverse lookups.
6. dstat
– Real-Time System Monitoring
An excellent all-in-one replacement for vmstat
, iostat
, and netstat
.
sudo apt install dstat
dstat -cdngy
Use Cases:
- Monitor CPU, disk, and network activity.
- Check system behavior under load.
- Find performance bottlenecks quickly.
7. bind -p
– Show Bash Key Bindings
Want to know what happens when you press Ctrl
+ something in Bash?
bind -p
Useful for:
- Customizing key behavior.
- Discovering hidden keyboard shortcuts.
- Creating more efficient terminal workflows.
Example:
"\C-l": clear-screen
"\C-a": beginning-of-line
8. touch /forcefsck
– Trigger Filesystem Check at Reboot
Create this file to ensure a full file system check runs during the next boot.
sudo touch /forcefsck
Why do it?
- Detect and fix disk errors.
- Schedule preventive maintenance.
- Useful after improper shutdowns.
9. ncdu
– Interactive Disk Usage Analyzer
A better, visual version of du
.
sudo apt install ncdu
ncdu /
Features:
- Interactive file browser for disk usage.
- Easily find large files.
- Delete files directly from the interface.
10. shred
– Secure File Deletion
Don’t just rm
sensitive files—shred
them:
shred -u confidential.txt
Why?
- Prevents file recovery by overwriting contents.
- Ideal for security-conscious environments.
More options:
shred -n 5 -z -u file.txt
-n 5
: Overwrite 5 times.-z
: Final pass with zeros.-u
: Delete after shredding.
Tips:
- Try
bat
instead ofcat
for syntax-highlighted file viewing. - Use
fzf
for fuzzy search through history or files. - Combine
watch
,grep
, andcurl
for auto-updating logs.
Wrapping Up
These Linux commands may not be famous, but they are powerful, time-saving, and worth learning. Add them to your toolbox, and you’ll find yourself working more efficiently and solving problems faster.
Have a favorite hidden gem of your own? Let us know!
Thanks for reading!
—
Guneycan Sanli