Article
Mastering the UNIX Command Line: A Beginner's Guide
When a web developer or designer uploads web site files to a web server, there’s a strong likelihood it’s running on an UNIX-style operating system. There’s an equally strong likelihood that, although developers and designers know all about how to upload their files through their favorite file transfer clients, the details of how it actually works are hidden from them.
While it’s possible to survive without this knowledge, many of you may have wondered what goes on up in that cloud where the UNIX gnomes carry out their work on your web creation. This desire to know how it all fits together probably occurred to you when things became unstuck, when you inadvertently placed your files in the wrong folder, resulting in dysfunctional CSS, or even a web site that didn’t function at all. And indeed, a bit of UNIX knowledge may have come in very handy at these times.
So, if you’d like to know what’s going on behind the scenes, and take a first step towards learning the nuts and bolts of a UNIX-style operating system, read on!
UNIX-style Operating Systems
So what does it mean for an operating system to be UNIX in style? How is it different from an operating system like Windows? Well, all UNIX-style operating systems are comprised of a group of similar tools that work together to produce a result, as opposed to a monolithic and stand-alone system such as Windows. UNIX’s groups of tools are also flexible enough to provide a number of ways to accomplish things. In fact, the common workaday toolbox is a useful metaphor here.
When you use a UNIX style operating system you have a useful box of tools at your disposal, and it’s well worth getting to know the basics of these tools. Furthermore, thanks to the similarities between all UNIX-style operating systems, once you know one tool you have a decent grounding for knowledge of them all.
While all UNIX-style systems have a standard set of tools, they can also contain specialized tools to meet certain objectives. The toolbox may come with every tool imaginable, or a limited set of tools to suit a very specific purpose.
The typical standard toolkit includes such things as the function to change directories, list files, move, copy, and delete files, control file permissions, see what programs are running, and so on. In their basic form, all these tools are very similar between different UNIX style operating systems. Think of the different types of toolboxes out there, from those treasured by tradespeople to those gathering dust in the sheds of home improvers. They’ll share common implements, such as screwdrivers, hammers, and wrenches. However, one may have an automated screwdriver, another may have different sizes of hammers, and still another may have strong grip wrenches.
The list of available UNIX-style systems is extensive, but here are links to the most common ones:
You may recognize them by their logos, pictured.

Despite their specializations, these operating systems will perform the same functions.
Package Management
Packages
While most UNIX style systems include a large selection of programs, you may find that you need additional functionality. The creators of UNIX operating systems can’t predict everything you’ll want installed, so they provide tools—known as package managers—to help you install new features.
Firstly, you may be asking, “What is a package?” A package is simply another way of describing a program or piece of software. It’s referred to as a package because it’s often “packaged” using a compression format like gzip or bzip2—similar to a zip file on a PC. Package managers help you manage the location, installation, upgrade, and removal of software packages.
Repositories
Package Managers keep a list of software repositories. These repositories hold all the packages that the system’s package manager can install. Systems will have an “official repository,” which contains all the packages that the developers of the operating system support.
Unofficial repositories carry packages that the package manager can install, but there won’t be any support for them. These unofficial repositories often contain experimental packages, packages that aren’t guaranteed to work on the operating system, or simply don’t adhere to the goals of the operating system. For example, Debian doesn’t allow certain packages due to licensing issues, so any such packages would need to be installed from an unofficial repository.
Where’s My Package Manager?
Those of you who use Windows are used to the standard install.exe or setup.exe files, where you download a program that installs the application package upon execution. In UNIX-style operating systems, however, your package manager depends on your operating system. Common package managers include:
- APT, which is found on systems that are based on Debian Linux. The many easy-to-use graphical interfaces include the popular Aptitude and Synaptic.
- RPM, which is the Red Hat package manager. You can also install the automatic updater and package installer Yum, which enhances the ease of operation of RPM.
- Ports, which is commonly found in BSD-type systems.
- Portage, which is used by Gentoo Linux.
Here’s the Synaptic Package Manager interface in Ubuntu Linux.
![]()
There are many other package managers besides the ones mentioned here, but these are the main ones worth knowing.
The UNIX File System
An FTP program or the command pwd (print working directory) will tell you what directory you’re currently in. pwd will output something like /home/website/public_html. This is referred to as a path. A path is like an address, in that it describes a location in a file system. In a path, directories are separated by a / character. To put it in plain English, the above path translates to the public_html directory, which is within, or under, the web site directory, which is under the home directory, which is under the root directory.
Some of you might be thinking, “Wait, I don’t see anything called ‘root’ in there!” That’s correct—the root directory is a special directory indicated only by the initial / character, which means it has no directories above it. On every system, there’s only one root directory from which every other directory stems. You might think of the root directory as the front door to the file system. Upon entering it, you have access to everything inside.
Chris White is a system admin for a Malibu based test preparation company.
He lives in sunny Ventura, CA and trains for marathons and studies Japanese in his spare time.