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.

After administering Unix or Unix-like servers, what tools (command-line preferably) do you feel you cannot live without?

share

locked by HopelessN00b Dec 5 at 6:14

This question exists because it has historical significance, but it is not considered a good, on-topic question for this site, so please do not use it as evidence that you can ask similar questions here. This question and its answers are frozen and cannot be changed. More info: help center.

closed as off topic by MDMarra, RobM, Iain Feb 26 '12 at 12:59

Questions on Server Fault are expected to relate to professional server, networking, or related infrastructure administration within the scope defined by the community. Consider editing the question or leaving comments for improvement if you believe the question can be reworded to fit within the scope. Read more about reopening questions here.If this question can be reworded to fit the rules in the help center, please edit the question.

42 Answers 42

Simple, basic but still essential:

ps - report a snapshot of the current processes.

free - Display amount of free and used memory in the system.

w - Show who is logged on and what they are doing.

share

pkill or ps for killing processes.

If you want to use ps to kill any process with a given name or under a certain directory blah (or any matching string you require) you can:

kill `ps -ef | grep <blah> | grep -v grep | awk '{print $2}'`
share
1  
Or, better yet, use the full power of awk and lose the greps (also modified to use the newer subprocess notation instead of the older and deprecated backticks): kill $(ps -ef | awk '/program_to_kill/ && !/awk/ {print $2}') –  Christopher Cashell May 4 '09 at 21:59
1  
To add to my previous comment, rather than explicitly excluding your command from the process listing (done by the original poster with 'grep -v' and by me above with '!/awk/', you can also pick a letter in your original search pattern and surround it by brackets. That will also cause it to not show up in the results. For example, my above command line modified would be: kill $(ps -ef | awk '/[p]rogram_to_kill/ {print $2}') –  Christopher Cashell May 4 '09 at 22:01
  • Bash
  • Vim
  • iostat
  • ps
  • top
  • lsof
  • strace
  • tcpdump
  • netstat
  • find
  • grep
  • Perl
  • sed
  • tail
  • dig
  • traceroute

Where possible the GNU versions of the above over the propritary versions.

share

These are the tools I use on a daily basis (as a developer more than a system administrator)

  • zsh
  • lsof
  • ps
  • ack (or grep)
  • find
  • svn
  • Python
  • tar
  • which
  • fortune (a guy has to keep his sanity somehow)
share

All the standard commands and utilities (Bash, grep, sed, AWK, find, xargs, ssh, Vim, etc.)

  • Lsof, awesome in so many ways, I love to use it for finding open ports AND the files associated with that process.
  • Screen, for multi-session awesome.
  • Tcpdump, its funny how many application problems are really weird network issues
  • Ruby, makes more sense to me than Perl, becoming wildly popular for SA work.
  • Chef, configuration management system.
  • Capistrano, ssh in a for loop, but less crappy. And in Ruby.
  • Rake, more sensible than make.
share

Perl and Vim. In that order. Anything else, I can use Perl to emulate somehow.

share
  • rsync running over ssh to keep things consistent... in multiple directions (-gloptru[n]c)
  • Vim and vimdiff to edit with 'folding' and viewing differences in scripts, logs, etc.
  • Perl and (Ba)sh for scripting and analysis
  • cURL (and maybe Wget) for posting/fetching data from ...
  • Apache to webify them all (or at least create point-n-click admin tools)
share

nmon

Haven't seen anyone mention this yet.

The nmon tool is designed for AIX and Linux performance specialists to use for monitoring and analyzing performance data, including:

  • CPU utilization
  • Memory use
  • Kernel statistics and run queue information
  • Disks I/O rates, transfers, and read/write ratios
  • Free space on file systems
  • Disk adapters
  • Network I/O rates, transfers, and read/write ratios
  • Paging space and paging rates
  • CPU and AIX specification
  • Top processors
  • and more

Can be run in file mode which generates a big CSV file. IBM also provide an Excel macro for parsing this and turning it in to awesome graphs, although you do need a Windows VM for that.

nagios and munin for monitoring and graphing.

share
  • atop - yet another top alternative, great for monitoring changes in processes
  • strace/ltrace - for tracking down those REALLY annoying bugs
  • ldd - track down broken library dependencies
  • cron, logrotate ;)

Of course, beyond command line, you need Nagios/Cacti/MRTG/etc...

share

Learn Vim or Emacs in and out!!
For text editing
Grep
Sed
AWK


For network tools
Nmap
dig

share

munin is a great tool for doing capacity analysis and review, but you need to set it up before you need it. We install it as a standard part of every server install we do.

share

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