I’m going to keep this one a tad short, because it’s usually the most boring part of Linux and most people aren’t as interested in it unless they’re hardcore geeks. And really, I’m not writing this little series for hardcore geeks. I’m writing it more for the power user, who knows their stuff, and might have an eye on Linux for a project, or an idea. I don’t care if people switch, that’s not my focus here. So, without further ado, let’s talk about the CLI shall we?
CLI is short for command line interface and you use the CLI through a little programme called a terminal. Ubuntu comes built in with a terminal called Terminal and other versions of Linux have something similar and probably call their terminals Terminal too. This harkens back to a bygone day when you really didn’t control the computer directly, you were connected to dumb client accessing a mainframe. The terminal was basically a phone call from one computer to the next and allowed you to talk to the mainframe and do stuff. These days, you use the terminal for a lot of things, but most of them involve the very computer you’re sitting at.
Now the Linux command line stuff tends to scare off the new folks because, well, look at this mess:
tar czf archive.tar.gz *.jpg
What in the hell does that do? Well actually it launches a compression programme (kind of like a ZIP file) called TAR which is short for Tape ARchive. That app creates a TAR file and then re-compresses it again using another app called Gzip. And finally it places all the JPG files in that archive file which is called archive.tar.gz. Got that?
Of course you don’t. Jesus, it’s worse than alphabet soup.
So let’s just talk about some really useful stuff to do on the command line side of things and, you can always learn more on your own. Believe me, there are plenty of websites devoted to nothing but how to make the most of the CLI.
The first thing I want to tell you about is top. Top is a little app that shows you what’s running, right now, and how much memory it’s using. It’s kind of like the Windows Task Manager. Type k, and then the process ID (usually abbreviated as PID) and you can kill a task. That’s useful for things that get locked up, stop working or, as they say in westerns, just need killin’.
Man or man as you’d actually type it, is a manual for a command or an app that you can access on the terminal side of things. If you want to see what the manual offers on the ls command (which is like dir in the Windows Command Line) you’d simply type:
man ls
And then you will learn more about the ls command than you ever wanted to know. All the switches, options, doo-dads, and things that even seasons geeks wonder “Why is that there? Whoever needed to do that?”. The man command works for almost anything command line related and it’s a one stop quick reference for CLI stuff. And yes, because Linux geeks are nothing if not complete, there is a manual for man, just type man man.
If you need a quick look at how much space you have on your hard disk(s) then you need the df command. Short for disk free, df is a simple little thing that displays everything on how much space you’re using and what’s left over.
If you’re using Ubuntu, and I am, then we can’t leave out sudo. Now, Phil Collins and Sussudio jokes aside, sudo is short for Super User Do. Super user is a fancy term for root, which is the account on your system that can do anything to your system. It’ll install software, remove software, mount disks, and even kill your system. Linux gives you such control over your system that a badly formed sudo command can ruin your day. At least it will ask for your password before doing anything. The sudo command basically runs programmes as if they were run by the root user. At least with Ubuntu, you’ll find yourself using it most often with another little app called…
APT, better known as apt and not so well known as the Advanced Packaging Tool. Apt is a programme you use to install things on your system. Programmes, updates, and so on. I could write a whole article on apt, but it’d be boring as hell. The important thing is the combination of the sudo and apt command, which you typically see as:
sudo apt-get install inkscape
What this means is, as a super user, do the apt thing and have it get and install the InkScape programme. Sudo will ask for your password and then apt will take over from there.
The funny thing? Almost all of this can be done from the desktop. A normal, non-geeky user can go days, if not weeks in Linux without ever opening a terminal programme. Want to see the contents of a directory? Sure, you can use ls, but isn’t it easier to just double click that folder icon and open it up to take a look? Want to install software? Sure, apt will do it and do it fine, but the Ubuntu Software Centre is much friendlier to use. Compressing files? Select a bunch of them in a window using your mouse, then right click on them and click Compress.
It used to be you absolutely needed the terminal to run desktop Linux just like you needed a DOS window to get the most out of Windows. While you certainly can get a lot more out of your Linux install by learning some basic CLI stuff, you don’t have to become an expert. I’m certainly not, and I get along just fine, thank you!


