TE
科技回声
首页24小时热榜最新最佳问答展示工作
GitHubTwitter
首页

科技回声

基于 Next.js 构建的科技新闻平台,提供全球科技新闻和讨论内容。

GitHubTwitter

首页

首页最新最佳问答展示工作

资源链接

HackerNews API原版 HackerNewsNext.js

© 2025 科技回声. 版权所有。

Lazy Linux: essential tricks for admins

162 点作者 jaspertheghost超过 16 年前

13 条评论

iigs超过 16 年前
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 未加载
LogicHoleFlaw超过 16 年前
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.
mlLK超过 16 年前
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 未加载
raamdev超过 16 年前
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.
m0nty超过 16 年前
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 未加载
sunkencity超过 16 年前
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
davidw超过 16 年前
What are your favorite, but lesser known Linux commands?<p>fuser, strace, ltrace, nc come to mind offhand.
评论 #436469 未加载
评论 #436848 未加载
lallysingh超过 16 年前
Quick question, is it just me or is gig ethernet 1000 Mbps, not 1024?<p>Man "mebibits" sounds terrible.
bonaldi超过 16 年前
<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
Goladus超过 16 年前
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.
delano超过 16 年前
A better title: 9 interesting Linux commands and 1 reason to absolutely avoid CentOS.
评论 #436503 未加载
babo超过 16 年前
A pretty unique collection, worth a look!
mlLK超过 16 年前
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 未加载