|
.comment: Essential Console Applications
Working Directly from the Command LineDon't get me wrong. The X Window System is great, and were it not for the window managers and desktops that it makes possible, the Linux user base would be a lot smaller than it is, and any notion of Linux becoming a desktop operating system with wide appeal would not exist. But X is not Linux, and putting too much reliance on a nice, graphical screen smiling at you may well one day be something you regret. Example: A few weeks ago, I downloaded and installed a replacement X server designed to make my video card sing. I installed it. Instantly, all sorts of applications ceased to function. Well, I said to myself, it's about time that I installed XFree86-4.0 anyway. There are a lot of things that I compile regularly, some of them pretty complicated and crucial. Rebuilding the kernel? A piece of cake. But I've never compiled XFree and produced results that worked. And already today something that seemed simple had gone terribly wrong. So I poked around and found some XFree86-4.0 rpms. I grabbed 'em--I'd done this before, four or five times, no problem--and when they were all aboard the local drive, I dumped out of what was left of my 3.3.5 and at the console attempted to install the new, much improved, XFree. Imagine my chagrin when, halfway into the third package, the rpm program told me that there was something wrong with one of the packages and it would not install. The next couple of hours were too horrifying and too embarrassing to recount. Let it suffice to say that at one point I had pieces of three versions of XFree86 installed. XF86Setup ran just fine, but the result wouldn't start, which was no big surprise. And, of course, in my relaxed confidence--I'd done this before with no problem--I hadn't backed up my semi-working version. So I couldn't even get back online from my nice graphical desktop and try to find a clean set of rpms. I had a command prompt. And the sense that clever use of the command prompt would be enough to solve the problem. Had I the knowledge to use it cleverly? This is just one of the multitude of cases where your only friend is that $ prompt, which you can su into a #. You will, sooner or later, face it yourself. The time to prepare for that day is now. A broken system does not present the ideal milieu for exploring the joys of new applications. And, as in the foggy distant past when Windows 3.0 got released and, once the user learned to tip-toe around UAEs, DOS skills disappeared, the increasingly elaborate new graphical desktops for Linux impart complacency about needing fundamental Linux skills. Linux lets you do very nearly everything from a simple command prompt, if you know the right commands. I don't know them all. Do you? Did you know that the chmod command recurses directories if you apply the -R option, while other commands do the same thing if you apply the -r option? And if you do, do you use these commands with sufficient frequency that you will remember them in the pinch? Me neither. Man pages are often helpful, but they are also sometimes a little obscure, which shortcoming is magnified when reading them in high panic. Fortunately, applications that will ease your way already exist. You probably have some of them on your machine already, though you may never have used them.
The Console ToolkitMost everyone has a favorite terminal application. Otherwise sane people are emacs heads. (Just kidding, okay? I don't hold people's religions against them, and hope they don't hold mine against me.) But here we'll deal only with the tools necessary to fix what's broken, that which keeps you out of those nice, easy-to-use X apps, the programs that ought to be on every system. Some of them have equivalents that aren't mentioned, and if you're comfortable with one of those, fine. These are the ones that work for me. A good text editor. This is yet another of those odd places where Linux holy wars erupt; one doesn't have to go far to find the emacs-vs.-vi wars. Neither of these programs is a cheerful place for the first-time user, which may be part of the reason why their masters are so vocal. They are not just programs, they are skills. They are not something to figure out when you're desperate. A mail program. Mutt is easy once you've configured it. Configuring it is not easy. Again, desperation is not the condition in which to undertake Mutt familiarization. And it might just be necessary to check the mail or to put out a plea for help. A way to get online. Here, your choices are limited. Work out your scripts ahead of time. And test them. A way to transfer files. It might be that all between you and X bliss is a corrupt download. Pretty sad if you can't fetch that one bad file, don't you think? A way to get onto the Web. Could be that somebody else has encountered the problem that bit you. Online docs and FAQs could solve the problem. A file manager. You'll use this more than you imagine. None of this is to suggest that the command line is otherwise useless. It is highly useful, and it's impossible to be involved with Linux for long without developing a few favorite commands. If you build your own software, there are some commands that you employ regularly. The command line is your friend. Here we're making it your savior in time of woe.
A Good Text Editor and MoreSomeday, someone is going to crank out a console clone of the DOS edit program: A simple text editor so uncomplicated that if you've ever even seen a computer you can probably figure out how to use it without resort to any documentation. Its users will achieve the contempt of old Linux hands, but that won't matter when it's just you and the command prompt. So far, though, while there is a world of great menu-driven X-based editors, there's nothing approaching a common user interface among those that run on the console. Having built and used a selection of editors, the one that seems to me easiest to use is Pico, known to survivors of the BBS days as the editor often used to create messages online. It uses a fairly simple Control + Hotkey interface. There is a good chance that you already have it installed, because it comes with Pine, which is . . . . . . . A Good Email Program Is it already on your machine? Best way to find
out is to go to a console (or terminal emulator), type If you don't have Pine/Pico, http://www.washington.edu/pine/ is the place to go. A Way to Get Online File Transfer and Web Browsing A File Manager For the rest of us, there is Midnight Commander,
one of my favorite Linux applications. A simple
And One Thing MoreThe tools I've mentioned equip the Linux user to recover from a wide variety of problems--a bad compile of a new desktop, the failure of an Internet dialer, file manipulations involving X itself that therefore ought to be done outside of X, or total loss of X itself. Combined with prudent backup of working copies of essential files, they will keep annoyances from becoming crises. But nothing replaces easy access to knowledge.
The chances are that unless you installed the bare minimum Linux distribution,
you probably have a world of documentation (probably in So one of the essential Linux tools isn't on the machine at all: It's a good Linux manual. There are several, but my favorite is Running Linux from O'Reilly & Associates. It's not distribution-specific, so its wisdom applies as long as you're, well, running Linux. It's neither overly difficult nor condescending. And it will bail you out when the latest gee-whiz X program to insulate you from the command prompt has failed. It doesn't hurt to actually commit to memory a few Linux commands. Those RPMs that you just downloaded to fix your system won't help you much if you're unfamiliar with rpm on the command line. Together, all these things are more than a first-aid kit. They're a toolkit that can help you develop and expand your knowledge of Linux, not necessarily to mastery but to a greater level of comfort. Which is a nice step toward the self sufficiency that once upon a time Linux was all about.
|