TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

Lazy Linux: essential tricks for admins

162 pointsby jaspertheghostover 16 years ago

13 comments

iigsover 16 years ago
Trick 5 (opening a remote port on a "public" machine to connect back to your local machine) is great. Combine it:<p>office$ ssh -R 9999:localhost:22 user@home ## do this in a screen for good measure<p>and another lesser known ssh feature:<p>home$ ssh -D 8888 -p 9999 user@localhost<p>and now you have a SOCKS proxy on home:8888 that will access everything visible to the computer named "office".<p>For extra credit add PingTunnel and a hotspot that happens to allow ICMP and enjoy free internet wherever you go.
评论 #436300 未加载
评论 #436723 未加载
评论 #436587 未加载
LogicHoleFlawover 16 years ago
When I was doing AIX administration, I liked that one command to kill processes with open files keeping a mountpoint mounted was:<p><pre><code> fuser -fuck /dev/whatever </code></pre> <a href="http://moka.ccr.jussieu.fr/doc_link/C/a_doc_lib/cmds/aixcmds2/fuser.htm#a30794a1" rel="nofollow">http://moka.ccr.jussieu.fr/doc_link/C/a_doc_lib/cmds/aixcmds...</a><p>Oh, admin humor.
mlLKover 16 years ago
While how-to lists hardly see the light of day (the front page) on HN, I had hate to see one like this go unrecognized.
评论 #435976 未加载
raamdevover 16 years ago
Very nice collection. A tech at the datacenter that hosts one my servers showed me trick #3 and I remember being thrilled sitting there watching him do stuff on my server and sharing the keyboard to type messages back and forth in vi.<p>My company uses trick #5 as a primary feature for accessing the remote Linux machines that our product is built upon. We have it set up so that every single machine automatically creates a reverse SSH tunnel to the server on boot, so that the tunnel is always accessible in case we need it. Very cool stuff.
m0ntyover 16 years ago
To get back a hosed screen, also try:<p>stty sane ^j<p>(That's Ctrl-j there.)<p>You might be flying blind, but just do it and you might get your screen back.<p>You probably know this, but to rescue a hosed system with Knoppix or similar live-cd:<p>- Boot from CD.<p>- Open root console.<p>- Mount your usual root partition: mount -t somefs /dev/hda1 /mnt/oldsys<p>- chroot /mnt/odlsys /bin/bash<p>Showed that to another admin who'd lost a production box, and his chin kind of hit the floor :) I gifted him the Knoppix disk... You can also use that to reset passwords (as per the article), by editing /etc/shadow or /etc/passwd in the /mnt/oldssys directory.
评论 #437839 未加载
sunkencityover 16 years ago
great list! I especially liked the tip about sharing a screen session, been wanting a solution like that many times!<p>another great tip is how to list all subdomains on registered (not all dns servers allow this, many times you need to be on the same network, or it isn's allowed at all, but for solving you own dns issues it's a boon)<p>dig mydomain.com. axfr
davidwover 16 years ago
What are your favorite, but lesser known Linux commands?<p>fuser, strace, ltrace, nc come to mind offhand.
评论 #436469 未加载
评论 #436848 未加载
lallysinghover 16 years ago
Quick question, is it just me or is gig ethernet 1000 Mbps, not 1024?<p>Man "mebibits" sounds terrible.
bonaldiover 16 years ago
<i># while [ 1 ]; do echo "All your drives are belong to us!"; sleep 30; done</i><p>Hee, things I didn't think I'd ever see on ibm.com, #12234 in a series.<p>People with company songbooks and nice ties must be spinning in their graves
Goladusover 16 years ago
If you thought #8 was really cool and useful, you should go learn bash, sed, and awk. Stuff like #8 is what makes unix fun.
delanoover 16 years ago
A better title: 9 interesting Linux commands and 1 reason to absolutely avoid CentOS.
评论 #436503 未加载
baboover 16 years ago
A pretty unique collection, worth a look!
mlLKover 16 years ago
Any admins care to share some pornographic passwords?<p><pre><code> p4ss1ng g4s 1n h3r 4ss w/ my sp34r d4n4 d03s d1ld0s @t d4 d1ld0 st0re d1ck r4p3d j4n3 w/ h1s d1ng d4ng</code></pre>
评论 #436472 未加载
评论 #438805 未加载
评论 #436371 未加载