Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

What are tools/utilities that you should absolutely know while working as a Linux or Windows Sysadmin.

I'm thinking for example about GNU/screen that you'll need if you're working on Linux servers.

share|improve this question
    
+1 for GNU/Screen - I've only just "discovered" it this week ... –  David Heggie Apr 30 '09 at 15:44
    
Are you talking about software or hardware tools? –  Sung May 7 '09 at 4:41
    
I was thinking about software but hardware is useful too. I think I will transform that post as a CW to list all tools. –  paulgreg May 7 '09 at 6:57
add comment

closed as not a real question by Chris S Feb 26 '12 at 20:08

It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical and cannot be reasonably answered in its current form. For help clarifying this question so that it can be reopened, visit the help center.If this question can be reworded to fit the rules in the help center, please edit the question.

26 Answers

up vote 25 down vote accepted

vi - I know not everyone likes it, but its pretty much going to be on any *nix server you come across, and when everything else is broken you are going to need to edit config files. I would also suggest csh and sh for the same reasons

share|improve this answer
4  
Actually vim, but always knowing the vanilla vi commands is useful for installs where there's no vim installed. –  Rob Wells Apr 30 '09 at 17:45
5  
I think this post had a so much more potential for other answers. I think this is marked as an answer a bit prematurely... –  Sung May 7 '09 at 4:42
    
i prefer vi to vim and try to use it as much as possible. :P –  Roy Rico May 27 '09 at 23:13
add comment

As a Windows Sysadmin, you absolutely need to be familiar with SysInternals. Both for programming and for diagnosing what is going on with a machine, these are invaluable.

share|improve this answer
2  
Absolutely - those tools have saved my neck more than once. –  Keithius Apr 30 '09 at 16:34
add comment

PuTTY: A great free SSH client for Windows. Just about everywhere I've worked has used this to connect to Unix servers from Windows.

share|improve this answer
3  
I use PuTTY when I'm using someone else's computer to log in remotely. But on machines I use regularly, I have to install Cygwin/X. There's no substitute to having an X clients display on your own box. –  Jon Ericson May 1 '09 at 1:35
2  
+1, PuTTY is made of 99.98% pure Win. –  Avery Payne Oct 6 '09 at 20:10
    
Just to add. Lots of people know and love putty. I love introducing them to using Pageant as well. For some reason 75% of people I know who started using putty had no idea Pageant existed until I walked them though setting up their public/private key pair. Now they can't believe they didn't have it before. –  Zak Oct 27 '09 at 20:23
    
Also take a look at KiTTY kitty.9bis.net and MobaXterm stackoverflow.com/questions/40453/… –  Vadzim Jan 17 '13 at 15:36
add comment

alt text

Don't forget a sysdamin needs to get physical with their computer boxes!

You need to make sure you've got at least one

  1. Philips head screwdriver
  2. Standard (Flat head) screwdriver
  3. Tweesers (to pick up those screws that have fallen into some dark hidden spot on your mobo)
  4. Spare SATA cable
  5. Spare Network RJ45 cable (and cross over cable)
  6. Compressed air -> get rid of all that dust.

Some dude also writes about the top 10 things he/she thinks everyone should have in their toolbox.

share|improve this answer
add comment

Scripting.

I learned that even Windows' standard command shell can be really useful. No need to install PowerShell or cygwin to get a decent scripting functionality, especially when the scripts are supposed to be deployed on client machines.

share|improve this answer
2  
I agree with the importance of scripting, but I wouldn't agree that you can get decent scripting without installing Cygwin, powershell, Perl, or something along that line. Batch files are a frustrating joke compared to a real, full featured, scripting language. –  Christopher Cashell Dec 10 '10 at 17:43
2  
Of course a full-featured scripting language is loads better than bat, cmd or vbs scripts. All I'm saying is that the built-in Windows scripting tools are enough for surprisingly many tasks, especially when there is nothing better at hand. It's sort of like the "'Let's use regular expressions!' - Now you have two problems" saying. –  macbirdie Dec 11 '10 at 12:05
add comment

Windows Tools:
In recently debugging a multicast problem I was having, I found NMap to be incredibly useful for debugging the network traffic. Wireshark was helpful as well.

share|improve this answer
5  
Both also available on Linux (and also very useful) –  David Z May 10 '09 at 6:38
add comment

The perfect companion to PuTTY for Windows users administering remote *nix machines for me is WinSCP, a perfect, small simple and really usable FTP, SCP and SFTP client.

share|improve this answer
add comment

There are a ton of small unix/linux tools that are helpful

grep, strace, GNU Screen, locate, rsync, sed, awk, and tripwire is pretty interesting too.

The list really goes on and on, I'm sure forgot far more than list here. Also, learn about how to configure these tools the way you want, like configuring .*rc files. This will make them all so much more useful. For example, here is my .screenrc file, since you seem interested in screen.

1 startup_message off
2 hardstatus alwayslastline
3 hardstatus string '%{= kG}[ %{G}%H %{g}][%= %{=kw}%?%-Lw%?%{r}(%{W}%n*%f%t%?(%u)%?%{r})%{w}%?%+Lw%?%?%= %{g}][%{B}%Y-%m-%d %{W}%c %{g}]'
4 
5 # Window numbering starts at 1, not 0.
6 bind c screen 1 
7 bind 0 select 10
8 
9 # Default screens
10 screen -t shell1        1
11 screen -t shell2        2
12 screen -t shell3        3
share|improve this answer
    
Can you say what the hardstatus string produces? Be nice to see it here rather than decoding the gobbledegook above ... –  Hamish Downer May 1 '09 at 12:47
    
very true! It is extremely cryptic. it divides the status line into three parts. on the left is the hostname, center is a list of all the screens with their number and name, the current screen is highlisghted, on the right is the date and time. There's a lot of different colors in there too. –  devin May 2 '09 at 4:21
add comment

Powershell! Powershell is a fantastic command shell for windows, built on the .NET framework.

share|improve this answer
add comment

On any platform you should be familiar with the native, and popular backup tools. Nothing bugs me worse the a sysadmin who doesn't know how to make a good backup. A good backup will save you from almost any mistake you may make.

-ntbackup on windows, dd/tar on Linux -database dump commands -tftp to backup switches/routers/devices

share|improve this answer
add comment

ping traceroute / tracert netstat nslookup

share|improve this answer
3  
and don't forget arp and route print –  Xn0vv3r Jun 5 '09 at 10:29
add comment

tail - Available on most Linux/Unix systems lets you view the last lines of a file (or the tail end). tail -f allows you to view new lines added to the file as they appear.

For Windows I like BareTail.

share|improve this answer
    
I like less better, just type "F" (shift + f). less will also keep "the right file" tail follows inodes which is a problem when logfiles get rotated at the moment you look at it. –  Server Horror Jun 24 '09 at 14:53
    
Using tail -F (as opposed to tail -f) gives you follow-by-name behavior, instead of follow-by-inode. –  Christopher Cashell Dec 10 '10 at 17:45
add comment

The shell scripting tools: bash/sh, awk, grep, head, tail, less, cat, sort, uniq, wc (and others)

Awk lets you easily analyze log files or other files which is critical when you need to diagnose a problem. Some people use perl for this. You don't need to know everything about either tool, but you should know something, so that you can check that access log or http log and figure out if something unusual is going on.

Combine awk with sort, uniq, tail, grep, and wc to make your life pretty easy.

Mix in some shell scripting. It's super handy to be able to do things like

for i in server1.example.com server2.example.com server3.example.com ; do
  xterm -e "ssh ${i} tail -f /var/log/message | grep something ";
done;

this lets you grep the logs on three servers for something. Tricks like this save you lots of time, and it's all due to the shell scripting tools.

share|improve this answer
    
you should know of this gem: for i in server{1,2,3}.example.com ; do. Shortcuts like this save a lot of typing. –  mogsie Jan 9 '13 at 17:12
add comment

This is probably not the answer you wanted, but I just wanted to share some thoughts. In general system administration is not only about the tools, but also about mental framework you use. In short - if you know what tasks you want to do, then finding a tool to do it is pretty simple.

Basically there are few questions sysadmin has to know about the system:

  1. What do I have? (Hardware, software inventory tools, like rpm, apt, lshw)
  2. How am I doing? (cpu, memory, disk usage, application usage tools, like top, vmstat, sar)
  3. How will I be doing in the future? (monitoring tools, such as nagios, zabbix)
  4. How secure I want to be? (firewalling tools, server hardening tools, like iptables, snort, ids systems, security modules for applications)
  5. What I want my server(s) to do? (tools to manage applications, for example postfix, qmail, apache, java, php and so on).
  6. How to make my life easier? (tools to version config files, deploy configuration into multiple servers, unattended installs)

Now the personal choice of the tools is .. personal.

Btw, the answer about vi is great!

m

share|improve this answer
add comment

A good editor. Doesn't matter which one, I'm certainly not here to start a flame war. But you need to learn a good editor.

I use Emacs for just about everything. Vi(m) is another good one. Not sure about what would be best in Windows, but I'm guessing the Win32 variants of the 2 I mentionned would be good.

share|improve this answer
    
As pointed out above, vi is available on every single server so knowing that is invaluable when you are in the hosting company. If you can't connect to the internet you can't install your editor of choice, so make sure you can edit config files with what is available and spend half an hour to use vimtutor (type vimtutor at the command line). Although nano is fairly universal aswell, with rather less of a learning curve. –  Hamish Downer May 1 '09 at 12:50
add comment

For Windows sysadmin:

Cygwin. Sometimes you just need to do a quick text file grep, wc, awk, or something that would take too long to write as a script. Quick web log scans with grep and awk can really save the day.

share|improve this answer
add comment

dmidecode - Excellent for getting all sorts of information about the machine it's running on

strace - for when you can't figure out why the command you're issuing doesn't work the way you wish it did

find - There are more options to this little command than you are probably aware of. Read the man page and be enlightened

xargs - Very, very handy when you need to deal with lists of things

rsync - Knowing rsync and its various options is vital to moving data securely and quickly around your network

telnet - the humble telnet command has probably assisted me in diagnosing more network connectivity problems though the years than any other command

nmap - except maybe nmap

nc - netcat is awesome for setting up quick servers to see what clients are trying to do, or even for "telnet" using udp. Read the tutorials to see how powerful it really is

openssl's s_client Telnet over a secure connection into https servers to diagnose weirdness.

I'm sure there are a ton more I'll remember eventually. Check back for updates ;-)

share|improve this answer
add comment

Process Monitor especially to troubleshoot Permission problems.

share|improve this answer
add comment

I'm becoming a huge fan of DTrace, though at this point it's not available for Windows.

share|improve this answer
    
Is Dtrace available for Linux? How do you even get Dtrace? –  devin Apr 30 '09 at 19:55
1  
Not that I'm aware of, but systemtap[sourceware.org/systemtap/] has a beta that is on my list of stuff to play with. It looks like it does similar things that DTrace does, but for Linux. –  Milner Apr 30 '09 at 20:36
add comment

I wonder that no one mentioned VNC.

share|improve this answer
    
+1 you just did. :) Still viable and usable as it was when it first appeared. –  Avery Payne Oct 6 '09 at 20:13
    
A lot of sysadmins doesn't use X to adminisering their *nix servers. Instead of VNC I prefer FreeNX. –  sumar Nov 16 '09 at 9:53
add comment

A few I normally use:

ps: to see the processes currently running
wc: word count. Displays new lines, words, bytes.
grep: find pattern. Match or no match (inverse match)
> for redirecting output to new file or >> to add at the end of a file.
| to chain commands together. Output of first command used on the next one.
tee: writes the input it receives to a file and it also displays the text on screen.

most common chain i use:
ps ax | grep mysql

share|improve this answer
add comment

For Windows, let's not forget NET and NETSH, you'd be lost in networks without them.

share|improve this answer
add comment

Some tools are not mandatory but make the daily life easier:

  • ccze to watch logs in color
  • the moreutils package (deb)
  • cfcat to watch config files without comments
  • wget and how to redirect its ouput
share|improve this answer
add comment

On unix, dmesg. It collects all the system diagnostic messages and displays them nicely on the screen.

And yeah it's been 'obsoleted' by syslogd, but I still havent figured out how to get the syslogd setup to display things as nicely as dmesg does.

share|improve this answer
    
tail /var/log/kern.log –  Teddy Oct 17 '09 at 14:28
add comment

It has to be SSH and Putty for me: it saves so much legwork & travel it's untrue, and there's no messing with graphical settings or waiting for screen refresh :-)

share|improve this answer
add comment

Not the answer you're looking for? Browse other questions tagged or ask your own question.