Top 10 Items in the Linux Admin Toolkit
Joe Barr writes "Joe 'Zonker' Brockmeier has listed his favorite top ten tools for Linux system administration in a story on Linux.com, one of Slashdot's sister sites." From the site: " Since I spend a lot of my time working with text files, either when I'm writing and editing or when I'm mucking with configuration files and shell scripts, I've become very attached to my editor of choice -- Vim. Over the years, I've tried a lot of other editors, but none of them has been sufficient to coax me away from Vim. Part of the reason for that is the fact that I no longer have to think about using Vi-style keybindings, and adjusting to anything else would seriously hinder my productivity."
Condoms! With all the groupies chasing Linux system admins, you can never have too many condoms!
the article said "toolkit" not "tool shed, tool warehouse, and tool factory on wheels".
MORTAR COMBAT!
Yes, let's dig one of the oldest flamewars back up in the summary rather than discuss some of the article's other excellent information.
TFA mentions WGet, one of the most wonderful, most needed applications that most users and admins ON EVERY PLATFORM don't know they need. Why not focus on this rather than ressurect the text editor wars?
The next Slashdot story will be ready soon, but subscribers can beat the rush and slashdot the links early!
The only 3 commands any Emacs user needs to know:
Ctrl-x
Ctrl-c
vi
d that bash has made some progress over the years, but zsh is my friend.
Wget sucks, curl rules!
Media that can be recorded and distributed can be recorded and distributed.
-kfg
It is suprising the author chose "telnet" as one of the programs in his list.
Sure it is useful for diagnosing random problems, and troubleshooting things - for example connecting straight to a webserver, or simulating a POP3 login request, but I've always preferred netcat.
netcat is much more useful, it allows you to bind to sockets and handling incoming requests as well as make outgoing ones this introduction is a good read.
Missing tools from the list? curl, links/lynx, rsync, sudo, nmap, lsof, and less.
rm
preferably with the -Rf options.
Sony ha
I'll plug my own project here: Cream is Vim tricked out in single mode with all the development tools pre-configured with all useful shortcut keys self-documented in the pull-down menus. You won't need to go searching through the help ever again.
There is no need to use a SlashDot sig for SEO...
I'm actually suprised this guy used telnet. I find netcat (man nc) as a much better alternative. I can script it, I can do udp, and I can do port "testing".
Now, some of those are "well-known", but there are plenty there that few people (even on Slashdot) are likely to be overly familiar with.
It's a small world and it smells funny; I'd buy another if it wasn't for the money; Take back what I paid (SoM)
ethtool and mii-tool. The Cisco 2970 switch we use has the knack of initializing the interface in half-duplex mode if the port is set to "Auto". Easily fixed by setting the port to Full, but useful nonetheless.
/etc/hosts.allow and /etc/hosts.deny, or where pop3/imap are looking for PEM certificates to configure pop3s/imaps, etc...
/proc filesystem. Favorites include /proc/net/dev, and /proc/uptime, /proc/cpuinfo, /proc/loadavg. Good for aggregating individual server load data in a cluster.
... permissive. Cut down on access to your logfiles and to config files in /etc.
.. might take a while. When you forgot to & your command, use CTRL+Z then bg your job.
strings. Good to check if executables are using
vmstat. Think your system is paging, or a card is generating too many interrupts?
awk and sed. Mentioned elsewhere, but priceless.
chmod. I think the Linux filesystem permissions are too
*quota*. A must for restricting disk space use.
umask. When you need root, set your default umask fairly tight. I use 0077, but when you need to cpan some common perl modules, switch to the more common 0022.
jobs, fg and bg. Old-school unix commands to play with jobs that
There may be more, but I can't think of any others right now...
Screen is very useful. I think of it as providing virtual terminals (you know, Ctrl-F1 to Ctrl-F6) but over remote login (usually ssh in my case)
My normal usage is like so:
ssh into the box
screen -r (resume session, that was created first time I went in after bootup, with screen -S)
Ctrl-A Ctrl-N (next virtual terminal) to flick through things i have running, usually centericq (text multi protocol chat client) and btdownloadcurses, or the results of a compile I left going.
Ctrl-A Ctrl-C (open new virtual terminal) which gives you another command prompt. Here I'll wget a tarball, extract it, start the compile, then Ctrl-A Ctrl-N back to centericq
I'll disconnect from the box (Ctrl-A Ctrl-D to disconnect from screen, then Ctrl-D to close the login shell), go home, reconnect from one of my other machines, go through the same process.
Also, I can stay connected, go to another machine, and use screen -x to have multiple connections to the same screen. In the case of a dropped connection, and screen thinks my old login is still valid, screen -rD will disconnect the old login.
Oh, and Ctrl-A ? will show all the in-screen escape sequences. Some of them I haven't used (there is one to do horiz split display, but it crashes btdownloadcurses), but look like they could be even more useful!
But really, the best part is not having programs killed on me because the internet connection dropped (as happens all too often around these parts).
I was actually going to say something very similar, and then I realized that I use telnet over netcat for certain purposes, because telnet notifies me when it actually connects. However, a couple minutes ago I realized I was being an idiot, because 'nc -v' does the same thing.
Also, if you haven't already, check out nmap-ncat.
Better to light a candle than to curse the darkness.