Friday, 6 July, 2007

Linux is for everybody - just approach it the right way!

Linux is for everybody.
Yes, I just said that.
A few months ago, I would have vehemently opposed such a statement. That was when I was trying to learn the Linux GUI - because that's what many recommended on forums; a lot of posts said Linux with a GUI is very much like Windows.
It isn't.
Then, I did the Right Thing - I got hold of a Unix book (not a Linux book - because a lot of them try to 'simplify' the task at hand and suggest things that won't work in many situations).
If there's one good thing about the Unix books, it's that they don't try to teach you GUI. We all (well, at least most of us) come from Windows or Mac and are very much used to the GUI. So, when we learn Linux, we try to use the GUI the same way we've used it for so many years.
The problem is, it doesn't work that way. Linux does have a GUI, and it has improved a lot. However, unless you learn the command line, life's going to be pretty difficult for you...

Command line? That strange black entity with no fancy icons or anything?
Yep... But it isn't as unfriendly as you think. In fact, you'll get accustomed to using it in some 15 minutes. And you'll start loving it in a few days.

But... but.. doesn't that mean I have to learn some commands? (Gulp...)
Yes and no. You do have to learn a few basic commands, but they are really quite a few, and aren't all that difficult to learn. The other commands you can always look them up. We'll come to that shortly.

Before that, let's see a few things that are essential in making the command line easy:
* Tab completion: Type half of a filename, type a tab, and Linux completes the name for you. Type a few letters of the latest command you learnt, type a tab, and you get the command completed for you. This might not seem all that important, but this is what transforms a laborious job of typing out everything into a quick and easy way of doing things.
* Command history: Anytime you want to repeat a command, or do a slightly modified version of it, press the up arrow a few times. You can go through a long history of the commands you typed. This is the next important feature in using a CLI (Command Line Interface).
* apropos: This is a nifty little program that searches the help pages for a word you specify. Not sure what program to use to view pdf files? Do an 'apropos pdf', and you get a list of all programs whose descriptions contain the word pdf. This is the 'look it up' utility I talked about earlier...
With these three features at hand, you can master the world of Command Line in a few days. Want to shrink that to a few hours? Just keep watching here - we'll look at a few very important, easy-to-use commands that will make you a confident user of the command line, and will get you some awed looks from among your geek friends... :)

No comments: