Free Newsletters :

Linux Desktop: Command Line vs. User Interface

In many instances, the Linux desktop’s command line is preferable to its graphical user interface.
(Page 1 of 2)

In the Linux desktop world, the graphical user interface is here to stay. Old Unix hands may grumble, but the fact remains that, without all the efforts poured into GNOME, KDE, Xfce and others, Linux would not be as successful as it is today.

The reason for the desktop's success is obvious. A desktop requires much less knowledge than a command line, and is suited to maybe 80% of the most common tasks that an average user needs. If the desktop needs much larger applications, that hardly seems a problem on a modern computer.

All the same, the command line continues to have distinct advantages over the desktop. Although casual users often consider the command line as prehistoric as a giant sloth, it continues to give you more options and more tools that the desktop ever has or is likely to.

In fact, for many administrative tasks, the command line is actually easier than the desktop. Looking through my BASH history, I can see at least five circumstances in which I generally choose the command line over the desktop:

1) File Management

Whether you are copying, moving, or deleting files, the BASH shell gives you far more options than KDE's Dolphin or GNOME's Nautilus. Such desktop file managers do their best, but they can only plan for the average use cases, and add confirmation dialogs to prevent users from doing something rash.

Moreover, because menu and toolbars rarely have entries for symbolic links, a whole generation of desktop users are unaware that the possibility even exists, or when to use them.

By contrast, consider all the possibilities of a simple command such as cp (copy). To start with, you can decide whether you want an indication of progress, or the ability to confirm before overwriting files. If you want you can archive or backup files. You can choose to create symbolic links instead of copying, and whether to preserve file attributes, and you can ensure that you remain on the same filesystem or not. Other file management commands are similarly versatile, although some of the details differ.

Another practical consideration is that, when moving large numbers of files -- for instance, when you are doing a backup -- desktops tend to freeze, no matter how much RAM your machine has. Consequently, you can be left waiting for your file management to complete, unable to do anything else. Or, even worse, you can be left uncertain whether you have actually succeeded what you are doing. These problems simply don't exist at the prompt.

2) Listing Files and Attributes

Just as with the file management commands, the ls command gives you far more versatility than any desktop display. True, by definition you can't have an icon view, but you can you use colors or symbols to indicate different types of files.

You also have all the filters available in desktop file managers, including whether to show hidden and backup files, as well as the ability to sort listings by extension, file size, time modified, and file version.

However, what I appreciate most about ls is that when you use the -l or -g option, all the information about file attributes is printed on a single line.

By contrast, in the average desktop file manager, you choose the default attributes to display, or at least their order (which, in anything less than a full-sized window, often comes down the same thing). Often, too, permissions are listed on a separate tab, and four or five keystrokes away.

3) Scheduling events with crontab

Some applications simply defy a graphical interface. Oh, you can make one, if you insist, but the result is always proof (if you need any) that slapping everything into a window does not necessarily make for user friendliness.

That is especially true of applications with hundreds of options, such as Apache. However, it can also be true of much smaller utilities such as crontab. I have yet to see a crontag graphical interface that was not more intimidating than the command itself. By the time I have finished deciphering a desktop of crontab, I could have scheduled half a dozen jobs to run at a latter time.

4) Package Installation

Both apt-get and yum, the leading package management tools, have had graphical front ends for years. However, just as with file managers, you can practically hear graphical package tools like Synaptic or the Ubuntu Software Centre grinding away when processing large numbers of files. In fact, when you update, many of these desktop tools simply freeze -- often while giving very little indication of what is happening.

Moreover, if you want to install something too soon after you log in, often the graphical tools have a conflict with the update applet. When that happens, you either have to wait or decide which one to close.

Yet, even at their best, desktop package managers have no significant advantages over the command line applications for which they front. The command line applications are among the most straightforward and easiest to learn for routine purpose, and return much more information, especially in .deb-based systems. Aside from the general assumption that users must do everything from the desktop and that the command line should be feared, there is simply no reason not to use the command line tools.

Next Page: Command line and desktop resources....


Page 1 of 2

 
1 2
Next Page



Tags: Linux, command line, Linux desktop, Gnome, KDE


0 Comments (click to add your comment)
Comment and Contribute

 


(Maximum characters: 1200). You have characters left.