Operations 19 min read

10 Lazy Sysadmin Tricks to Supercharge Linux Efficiency

This article shares ten practical, time‑saving Linux system‑administration tricks—from unmounting a stuck DVD drive and resetting a frozen console to using screen sharing, SSH tunnels, VNC, bandwidth testing, and powerful command‑line one‑liners—helping admins work faster and enjoy more free time.

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

Efficient system administrators can dramatically reduce effort and cost; this article presents ten basic “lazy” tricks for Linux sysadmins to boost productivity.

1. Unmount an unresponsive DVD drive

Mount the DVD, attempt to eject, then use fuser /media/cdrom to find the holding process and terminate it with fuser -k /media/cdrom before ejecting again.

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

2. Recover a frozen screen

When the terminal appears garbled, use the reset command (not reboot) to restore normal output without restarting the machine.

# reset

3. Screen collaboration

Use GNU screen to share a session: start a named session with screen -S foo, let a colleague attach using screen -x foo, and detach with Ctrl‑A D. This lets both users see and control the same shell, useful for joint debugging.

4. Recover a lost root password

Reboot, interrupt GRUB, edit the kernel line, append 1 to the kernel parameters, boot into single‑user mode, and run passwd to set a new root password.

5. SSH backdoor (port forwarding)

Establish an SSH reverse tunnel from an internal machine (ginger) to an Internet‑reachable host (blackbox) using ssh -R 2222:localhost:22 [email protected], then connect from an external machine (tech) through blackbox to ginger.

6. Remote VNC over SSH tunnels

Start a VNC server on the target host, forward the VNC port (5999) from ginger to blackbox with ssh -R 5999:localhost:5999 [email protected], then forward it from blackbox to the remote client (tech) with ssh -L 5999:localhost:5999 [email protected], and finally run vncviewer localhost:99 on the client.

7. Check bandwidth with iperf

Install iperf on both ends, run it as a server on ginger ( /home/bob/perf/bin/iperf -s -f M) and as a client on beckham ( /home/bob/perf/bin/iperf -c ginger -P 4 -f M -w 256k -t 60) to measure actual throughput, typically around 112 Mbit/s per NIC.

8. Command‑line scripts and utilities

Use loops, awk, grep, and sed to generate files or gather data, e.g., create 200 host entries with

# P=1; for i in $(seq -w 200); do echo "192.168.99.$P n$i"; P=$(expr $P + 1); done >>/etc/hosts

, or check memory across nodes with SSH and free -m | grep Mem | awk '{print $2}'.

9. Console inspection via /dev/vcs

Read the virtual console device ( # cat /dev/vcs1) to see what is displayed on a remote machine’s console, useful when SSH output does not show error messages.

10. Random system information collection

Gather CPU info with # cat /proc/cpuinfo, count processors with # cat /proc/cpuinfo | grep processor | wc -l, check disk usage with # df -h, BIOS version with # dmidecode, and NIC driver/firmware with # ethtool -i eth0.

Overall, mastering these command‑line techniques, sharing screen sessions, and using SSH tunnels can make a Linux sysadmin far more efficient, freeing time for other 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.

Linuxcommand-lineSSHVNCsysadmin tips
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.