Operations 19 min read

10 Lazy Linux Sysadmin Tricks to Supercharge Your Efficiency

This article presents ten practical Linux system‑administration tricks—from unmounting a stuck DVD drive and rescuing a frozen terminal to using screen collaboration, SSH backdoors, VNC tunnelling, bandwidth testing, and quick system‑info gathering—each designed to save time and boost productivity.

MaGe Linux Operations
MaGe Linux Operations
MaGe Linux Operations
10 Lazy Linux Sysadmin Tricks to Supercharge Your Efficiency

Efficient Linux system administrators can dramatically reduce routine work time with a handful of simple, often "lazy" tricks. Below are ten essential techniques covering device management, remote collaboration, password recovery, networking, and quick system diagnostics.

Trick 1: Unmount an Unresponsive DVD Drive

Identify the process holding the CD-ROM and force it to release the device before ejecting.

# mount /media/cdrom
# cd /media/cdrom
# while [ 1 ]; do echo "All your drives are belong to us!"; sleep 30; done
# fuser /media/cdrom
# fuser -k /media/cdrom
# eject

Trick 2: Recover a Frozen Screen

When the terminal becomes garbled, use the reset command instead of rebooting.

# cat /bin/cat
# reset

Trick 3: Screen Collaboration

Share a terminal session with a colleague using screen so both can see and type commands simultaneously.

# su - david
# ssh posh
# screen -S foo
# screen -x foo   # colleague joins
# Ctrl-A D        # detach
# screen -x foo   # re‑attach

Trick 4: Recover a Forgotten Root Password

Boot into GRUB single‑user mode, edit the kernel line, append 1 to the parameters, and reset the password.

GRUB screen
GRUB screen
Edit kernel line
Edit kernel line
Append 1 to parameters
Append 1 to parameters
# passwd
New UNIX password:
Retype new UNIX password:
passwd: all authentication tokens updated successfully

Trick 5: Create an SSH Backdoor with Port‑Forwarding

Use -R to forward a remote port from an external machine to the internal server, then connect through it.

# ssh -R 2222:localhost:22 [email protected]   # from internal host
# ssh [email protected]                         # from external host
# ssh -p 2222 root@localhost                               # access internal host

Trick 6: Remote VNC Over an SSH Tunnel

Start a VNC server on the internal machine and forward its port through the same SSH tunnel used in Trick 5.

# vncserver -geometry 1024x768 -depth 24 :99
# ssh -R 5999:localhost:5999 [email protected]   # on internal host
# ssh -L 5999:localhost:5999 [email protected]   # on external host
# vncviewer localhost:99

Trick 7: Measure Network Bandwidth with iperf

Install and run iperf on both ends to benchmark the achievable throughput.

# wget http://dast.nlanr.net/Projects/Iperf2.0/iperf-2.0.2.tar.gz
# tar zxvf iperf-2.0.2.tar.gz
# cd iperf-2.0.2
# ./configure -prefix=/home/bob/perf
# make && make install
# /home/bob/perf/bin/iperf -s -f M               # server side
# /home/bob/perf/bin/iperf -c ginger -P 4 -f M -w 256k -t 60   # client side

Trick 8: Handy One‑Liners for Hosts and Memory Checks

Generate a large /etc/hosts file automatically and verify memory size across many nodes.

# P=1; for i in $(seq -w 200); do echo "192.168.99.$P n$i"; P=$(expr $P + 1); done >>/etc/hosts
# for num in $(seq -w 200); do ssh n$num free -tm | grep Mem | awk '{print $2}'; done | sort | uniq

Trick 9: Console Inspection via /dev/vcs

Read the virtual console buffer directly to see what a remote user typed.

# cat /dev/vcs1

Trick 10: Quick System‑Info Collection

Gather CPU, disk, BIOS, and NIC details with a few commands.

# cat /proc/cpuinfo
# cat /proc/cpuinfo | grep processor | wc -l   # CPU count
# df -h                                          # disk usage
# dmidecode | less                               # BIOS info
# ethtool -i eth0                                # NIC driver/firmware

By mastering these command‑line tricks, Linux administrators can solve problems faster, reduce manual effort, and free up time for more enjoyable activities.

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.

efficiencyAutomationShellcommand-line
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.