February 2010
M T W T F S S
« Dec    
1234567
891011121314
15161718192021
22232425262728

The Linux terminal – why it’s A Good Thing.

You may have noticed that a fancy new operating system was released earlier this week. To much media fanfare, Microsoft’s latest Windows incarnation, Windows 7, was released. Microsoft even suggested that we throw parties to celebrate. Judging by their video of what they think a party should look like, I dread to think how awful the parties that Microsoft employees go to. (This one, however, looked much more interesting…)

To buy a new copy of Windows 7, you have to spend (based on my brief glance at Amazon.co.uk) around £100 for the “Home Premium” edition, around £150 for the “Professional” edition, and around £220 for the “Ultimate” edition. These prices are for standalone packages – upgrades from Vista or XP are slightly cheaper. Still, this means shelling out a not insignificant amount of money, even for a cut-down version of the full range of features offered in the top-of-the-tree Ultimate edition.

You may also be aware that another new version of a different operating system was released this afternoon, though you might not be aware of it if you rely solely on the BBC for your technology information. The BBCs coverage of the release of Ubuntu 9.10, nicknamed “Karmic Koala” was spartan compared with its coverage of Windows 7, to say the least. In places, it was downright patronising and dismissive.

One of the worries raised about Ubuntu by the BBC’s coverage which rather struck me as spurious was this notion that using Ubuntu requires you to learn lots of computer code and type it into the terminal to get anything working. This is patently nonsense, but to be fair, Ubuntu proponents are not very good at explaining why it’s nonsense. Most rebuttals seem to take the form of “oh, no, you don’t need to do that”. Which doesn’t really wash when a new user visits the ubuntu forums looking for help with a particular issue and is told to type some commands into the terminal.

I will try a different approach. The crux of the argument is that people have confused the idea that “you may use the terminal” with “you must use the terminal”.

The terminal is, to all intents and purposes, a good thing. It allows you to quickly get diagnostic information about your computer. It allows you to run the programs you’d run normally, having the program send diagnostic information to the terminal if it encounters an error. It is a very powerful tool.

Windows has a command-line interface as well. It’s called CMD and is based on MS-DOS, the standard text-based operating system used on PC’s in the 80’s and early 90’s. It does not have the same power in Windows as the Linux terminal has in Linux. This is arguably the main reason why you don’t use the command-line interface that much in Windows. Compared to the Linux one, it’s crippled.

Why should that matter, though? Surely everyone wants to use a graphical interface these days? Well, for regular users, yes. But Linux has one of those as well. In fact it has several options for graphical desktop interfaces: GNOME and KDE are the big two, then there’s XFCE for older machines, and a whole host of others. The point is this: just because the terminal is there doesn’t mean you are forced to use it. It is, however, a fantastic tool to use to help you to diagnose and fix things when things go wrong.

Most importantly, though, it makes giving instructions over the internet for how to diagnose and fix things much much easier. Compare these:

…press Ctrl-Alt-Delete, then click on the “Task Manager” button, then click on the “Processes” tab

and

…open a terminal and type “top”

and you can see how much less effort it is. Particularly if you’ve encountered a particularly nasty problem which would require opening a lot of windows and dialog boxes.

Let’s look at another example, this time taken from a guide to fixing audio problems. In part A of the guide, we instructions to type the following commands:

mkdir ~/pulse-backup && cp -r ~/.pulse ~/.asound* /etc/asound.conf /etc/pulse -t ~/pulse-backup/
rm -r ~/.pulse ~/.asound*
sudo rm /etc/asound.conf

Now, this may look like gibberish, but let’s see how those instructions would have looked if the terminal weren’t there:

Firstly, click on “Places”, then “Home Folder” to open the file manager. In the file manager, right-click on some empty space in the folder contents, select “New folder” and name the new folder “pulse-backup”. Now press Ctrl-H to reveal the hidden system files. Copy the folder named “.pulse” and any folder beginning with “.asound” to the folder you just created. Once you have done this, delete these folders from your Home Folder. Next, click on “File system” on the left-hand side of the file manager and navigate to the folder called “etc”. This folder contains various configuration files for your system. Copy the file “asound.conf” and the folder “pulse” and Paste them into your newly created backup folder. Finally, with administrative privileges, delete the file “asound.conf” from the “etc” folder.

Whew! That was some effort to explain – and even then I cut some corners: I didn’t explain how to get administrative privileges for example. Arguably this long-winded explanation could be seen as more “user-friendly” but if this were the effort required to produce one part of a guide, I very much doubt that the Ubuntu Forums would be quite so full of enthusiastic and altruistic volunteer tech supporters falling over themselves to help as they are currently.

A second problem with the verbose description is that it requires a particular configuration of Linux. It requires, for example, that your graphical interface is in English. It requires you to have the “Applications, Places, System” menu bar still on your screen as it was when you installed Ubuntu, and not replaced by a customised version. On the contrary, the terminal commands work the same regardless of language, and irrespective of whether your system is untouched from when you first installed it or heavily customised with all sorts of bells and whistles. Linux is a very customisable system, though it is reassuring to know that despite the infinite customisation possibilities afforded by the graphical interface, there is still a way of talking to the computer that remains the same regardless of what you do to its outward appearance.

So in conclusion then, the Linux terminal is not something that a user must learn how to use. Instead, it is something that may be used. It is particularly useful for giving written technical support over email or on a support forum. If you find yourself using the terminal for day-to-day tasks, then you’re doing it wrong (unless you’ve become so comfortable with using the terminal that it’s become second nature!) and criticising Linux for having a powerful command-line interface is like criticising a fruit seller for selling apples and oranges as well as pineapples and grapes.

I would also like to take this opportunity to mention that, unlike Windows 7, Ubuntu Karmic Koala does not cost anything. It’s free. In fact, I just downloaded myself a copy while writing this article. The unique selling points of Linux over Windows, such as its better security model, its price, its less prone-to-fragmenting file system and support community are not super-obvious right away, and don’t grab the headlines in the same way that a whizz-bang touchscreen interface does. But these are the things that matter – the long-term experience, not the flashy stuff that makes you go “ooh!” when you first see it.

$ mkdir ~/pulse-backup && cp -r ~/.pulse ~/.asound* /etc/asound.conf /etc/pulse -t ~/pulse-backup/
$ rm -r ~/.pulse ~/.asound*
$ sudo rm /etc/asound.conf
  • Share/Bookmark

1 comment to The Linux terminal – why it’s A Good Thing.

  • Stani

    The fact that the Ubuntu release was even mentioned on BBC at all is a living testatment to the growing influence of open source, even if Rory’s comments on air were downright offensive in an off-handed manner. His later review of Ubuntu did not particularly impress me, either, as Ubuntu practically “ships” with programs for managing audio and photos. But hey, at least he’s willing to give it the time of day.

    There are two things you missed:

    1) While Ubuntu is pretty good at providing GUIs, some features can only be configured propery using the CLI. For instance, my scanner was not detected by xsane until I opened up its configuration files and enabled an optional driver. Since editing global configuration requires root priviledges on Ubuntu, there’s no way around opening a terminal and at the very least typing “sudo gedit” to get a workable editor. Granted, it’s not really a big deal, but it already violates your premise that the terminal is a “may” not a “must”.

    2) It’s true that finding command descriptions can sometimes be more concise and useful, but Linux setups vary quite a bit. If the recommended instructions don’t work, you won’t know why unless you meticulously disect them (but arcane syntax for piping commands [think of find, exec and the like] and using regular expressions will scare away people fast). Worse, you likely had to execute those commands as root, and that’s not something you should do unless you know what you’re doing.

Leave a Reply

 

 

 

You can use these HTML tags

<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>