April 07, 2013, 10:41 PM — Thinking about becoming a Unix systems administrator?
The good, the bad, and the challenging
After several decades of administering Unix systems, I know more than I’d like to admit about “the good, the bad, and the challenging” of Unix systems administration. I’ve worked in companies with as few as four employees and others with tens of thousands. I’ve spent weeks doing routine, repetitive work and weeks grappling with such incredibly complex assignments that I’ve wondered if my brain was about to explode. I’ve had years in which I actually looked forward to Monday mornings and those in which I just couldn’t wait for Fridays. Unix systems administration can be everything from a predictable job to one in which every day is a challenge. In a small shop, you’re likely to have many diverse responsibilities; you might even be the entire IT department -- managing the systems, the network, the organization’s web site, and providing technical support to the staff. In a large company, you might be handling a mix of tasks along with a dozen other people just like you or managing one slice of a complex pie of responsibilities.
In any Unix admin position, however, you’re likely to spend some part of your time doing routine things and another part troubleshooting complex problems or learning something new. If you enjoy learning new things, solving problems, and chasing down challenges, then you’ve got a head start and might really like the work. When administering Unix systems, there’s always something new to learn, something new to install, some problem you’ve never seen before, and someone who desperately needs your help.
The core skills of Unix systems administration fall into five major areas –
software/application management (installing, testing, and updating the software on systems),
account management (adding and removing accounts, managing user access and privileges),
server management (running backups, monitoring and tuning performance, rebooting, setting up cron jobs, looking after the hardware and reviewing log files),
security management (managing host-based firewalls, checking file permissions, and checking on important security configurations), and
user management -- you really need to have good people skills; you need to understand that many of your users will know only a fraction of what you do about the systems they’re using and be good at helping them past their problems with as much patience and sensitivity as you can muster.
In order to work in any of the first four major areas, however, you’re going to need to be well grounded in a wide range of Unix topics.
First, you are certainly going to need to understand the basic structure of Unix commands – what’s a command, what’s an option, and what’s an argument. You will also have to be familiar with a core set of Unix commands and ought to be willing to read man pages to discover options you may have never used. You need to understand how search paths work and how various environment variables affect each user’s experience on the command line.
Some of the basic commands you need to be comfortable with are:
cal cat cd chmod cp date df domainname du exit finger ftp grep groupadd groupdel hostname ifconfig kill last logout lpq lpr ls man mkdir more mv passwd ps pwd rm rmdir scp sftp ssh sudo telnet useradd userdel w wc who whoami
You should also know:
- how and when to use ^c, ^d, and ^z.
- how to use pipes and redirects. If >, >>, 2>, and 2>&1 aren’t second nature to you, you need to make them so.
- how to use /dev/null both to make output disappear and to empty files.
- how to use of $? (the return code or “exit code”) to determine if the previous command (usually within a script) completed successfully.
- how to use regular expressions with commands such as ls, grep and perl.
- the effect of various quotes – how single and double quotes differ and how ` (backticks) can be used to add command output to a line.
- how to add and remove accounts (with or without removing the associated directories).
- how to work with permissions, timestamps, owners, and groups -- and how to determine if additional permissions have been assigned with the setfacl command. You should also get to know how to work with the security context of files when SELinux is in use.
- how to use essential Unix utilities like grep, awk, sed, and wc.
- how to use text editors. In fact, you really should know vi, though if it takes some time to get used to. Even if you love desktop editors like Gedit, you will someday find yourself on a command line with no other option. Besides, vi (along with its colorful variation, vim) can make a lot of the work that you do go a lot faster once you know how to use it well.
- scripting basics. You need to be very good at basic scripting – using if, for, and while commands if not also case statements and functions.
- how to work with processes – understanding ps output, knowing the kind of information you can get from /proc and how to use tools like lsof for determining what files a process has open.
- how to set up a new file system, look at disk space, track down large files, use fsck, and find files using many different criteria (size, ownership, permissions, type, etc.).
- where to find key directories and configuration files – those in /etc (e.g., /etc/hosts, the passwd and shadow files) and those in other locations (e.g., /etc/mail/sendmail.cf, /etc/samba/smb.conf).
- how to set up essential services (e.g., naming, printing).
- how to install packages using yum and apt-get and also how to install software from tar.gz files.
- how to apply patches and how to know when they’re needed.
- how to monitor systems using commands such as df and du to look at disk space, and commands like top and sar to monitor and evaluate performance.
- how your systems boot – their dependence on “start scripts” and whether they use systemd or upstart init services.
- how to use basic commands like dump and tar to back up directories or entire file systems.
- how to interact with other systems – logging in using ssh, moving files with scp and sftp, and using rsync for synchronizing individual files or entire file systems.
- how to view and manipulate timestamps on files, including using the touch command.
- how to configure a network interface; how to use the ifconfig and ip addr commands; how to set up the /etc/sysconfig/network file; when to use /etc/hosts and the hostname and domainname commands.
- how to configure extended services like NFS, NIS, and Samba for sharing file systems and network information with other Unix systems, and sharing files with Windows systems.
- how to do basic troubleshooting, tracking down what’s wrong when something is broken, looking at logs files, and using commands such as strace.
- how to configure and use sudo for limiting the use of root access to the bare essentials.
Unix systems are complex and any organization or project is likely to a unique set of tools, but a core set of skills will allow you to work productively in nearly any setting. If I've omitted any of the basic skills that you see as essential, please add a comment below.
Read more of Sandra Henry-Stocker's Unix as a Second Language blog and follow the latest IT news at ITworld, Twitter and Facebook.
Flickr / Konrad Twardowski