Hari's CornerHumour, comics, tech, law, software, reviews, essays, articles and HOWTOs intermingled with random philosophy now and then
Why the command line is essential
Software and Technology by
Posted on Fri, Jul 13, 2007 at 10:49 IST (last updated: Wed, Jul 16, 2008 @ 20:57 IST)
If you read the mencoder man page, you would realize how long it took me to figure out each of these command line parameters simply because it is huge and required a lot of scrolling up and down. I didn't relish the prospect initially. It was a long, tedious process to get the options right but I had to do it this way or not at all and I didnt want to admit defeat knowing fully well that it was not an insurmountable problem. In fact, once I figured out enough to execute the command successfully, I felt that it was actually a better way to rip and encode because I had greater control over the individual codec features. I'm convinced that the power and flexibility of mencoder can never be experienced in a mere GUI. Any GUI that attempts to incorporate every single feature of mencoder will be 100 times more complex than mencoder itself. The command line is a necessary part of the Linux experience. To be sure, beyond the initial system configuration, you can manage 90% of your tasks within a GUI and not all command line tools are as insanely complex as mencoder. But there will be situations where the GUI is insufficient, inadequate or just plain useless. At such times it will be not only be necessary, but actually desirable to fall back on the command line. If I could figure out the basics of mencoder in less than an hour, surely it would take a fraction of that time to learn other more basic, but essential tools. One common situation is when X refuses to start up after an upgrade and you need to tweak/configure its settings. Most new Linux users unfamiliar with the command line will end up wasting a lot of time reinstalling Linux to fix what is probably a trivial issue. On the other hand, experienced Linux users will know that editing one or two lines in
mencoder dvd://5 -dvd-device /dev/hdc -vf scale=320:240 -oac mp3lame -lameopts br=64 -ovc lavc -lavcopts vcodec=mpeg1video:vbitrate=300 -o rip-file.mpg
xorg.confcan fix the issue. I still remember the days when I used to soft-reboot the computer to quit vim (in pure text mode). Thankfully I quickly realized that to survive in a Unix environment a basic working knowledge of command-line text editors will go a long way. The other big advantage of familiarity with the command line is that it is also the most common aspect of all Unix-like operating systems. If you learn the basics of
sh, you can work with most Linux and *BSD systems. And this will definitely add to your knowledge and skill-set. Familiarity a variety of *nix Operating Systems can be extremely beneficial to your curriculum-vitae, particularly if you're in the IT/CS field. Here is my personal list of essential command line skills:
- All the base POSIX commands.
- Knowledge of any command line text editor. nano/pico are very simple, easy to use editors while vim is a more powerful programmers' editor.
- Knowledge of virtual terminals. Easy to use, yet extremely handy and convenient.
- Knowledge of a text-based web browser like links or lynx (useful for browsing online documentation in the absence of an X server).
- A little bit of scripting knowledge. Shell-scripting or basic Perl/Python scripting will do.