2015 note: more than one person recently showed interest in this page. Guru99 asked me to link his own up-to-date tutorial; I wish he consistently referred to the entire system as GNU/Linux, but the tutorial seems useful.

This information is not up-to-date in terms of program versions, and external links may break.

I originally wrote this page for some former (and future) students of mine, when working at LIPN. I'm not at LIPN any longer but I'm keeping this page online anyway, since several people have shown interest. Please see the home page for my current situation. —Luca Saiu.

Luca Saiu — GNU/Linux and the command line interface - pointers for students


Why this page

After the end of DEVL 2007 some students asked me where to get more information about the GNU/Linux command line; they needed it for some other course they were just starting, yet they asked me. Go figure :-).

I'm more than happy to give them some pointers.


Suggestions

The students I was talking about above complained that they were rudely dismissed after asking a beginner question on some public forum. It's very likely that they were right, even if asking a question in the proper forum is essential (see this FAQ); but there are some very strong personalities in the free software world, and some intellectual arrogance is a common personality defect among hackers.

I recognize this problem, also because we lispers tend to be even worse than the others — it may be because we're almost always right: that's irritating.

Documentation

This may look trivial, but be sure to read the documentation if you really want to understand how to use a piece of software. Only reading a HOWTO may solve a single practical problem of yours, but it doesn't give you the same broad knowledge which makes you more efficient at work.
Reading the full documentation takes some time, but not as long as you might think.

Since we're talking about the command line, here's what you must know well:

I'd say that if you master Bash, AWK and Sed then you can exploit 90% of the power of the command line. Note that (in GNU/Linux) all the four programs above are GNU, and that Bash and GNU Make are much extended and more powerful compared to the traditional Unix sh and make: be sure to read the documentation for the GNU implementation, and not for the traditional Unix version.

GNU manuals are typically well-written, and the "classic" ones describing the most mature software are excellent. Personally, I use them from the Info reader in Emacs (here's a web tutorial on Emacs: you should try to invest some time in it); I find the Info reader in Emacs much better than the standalone Info reader, and possibly also easier to use for beginners. Don't be scared by the user interface: once you get used to it you'll find it extremely quick and convenient to use.

If you don't have the Info documentation available you can use the HTML version of the manuals, but I find it much less convenient for searching. If you use the HTML version I recommend the "entirely on one web page" format, so that you can do full-text searches.

Here are some relevant texts:

These describe command-line programs such as ls, sort, diff or find: of course they're useful, but such utilities are typically very easy to use. I think this documentation is more useful as reference:

If you program in C you will find this extremely useful (chapters are self-contained: I suggest you to read the whole relevant chapter when you need information about one particular topic):

GNU Emacs has three manuals (see the DEVL page), of which this is good for learning the editor (the Lisp part is separate): If you're interested in seriously trying Emacs drop me a message. I'll send you a slightly modified version of the .emacs I use, more suitable to beginners (for example I keep the menu bar and the tool bar hidden in order to get more useful space on the screen, but they're definitely useful if you're just starting). If you only use the default settings the Emacs interface may look a bit intimidating.
I recommend to use at least GNU Emacs version 23; Emacs 23 has a new font engine supporting antialiasing, which is much kinder to your eyes.

When you're reading documentation for a GNU program always avoid man pages: use the Texinfo-generated documentation instead (Texinfo is the source language, which is automatically translated into Info, HTML, DVI, PostScript, PDF and Docbook: the text in the output documents is the same). The GNU project (correctly) regards man pages as obsolete, and maintains them sporadically: nearly always man pages are also available, but they contain much less information than the official Texinfo documentation.
If you want to learn about sockets, for example, you should read this chapter about sockets instead of the man pages of the socket() and related functions. Try and compare them.
I learned to program in Unix myself from the manual above (including network, process management, threads and synchronization, shared memory, signals, ...). If you already know the C language, I don't think you need any other book.

It goes without saying that you should install GNU/Linux on your computer. Using it for some hours a week in the lab is not enough for seriously getting acquainted with it. As a bare minimum you should use a live DVD/CD distribution.
But I strongly recommend a "real" hard disk installation.


More pointers

Here are some pointers. I started using GNU/Linux many years ago reading a tutorial which is now really too old to recommend, and I haven't personally read all of these.

Web

Some websites I've just rapidly skimmed:

Usenet

Usenet is not as fashionable as it used to be but it retains its original charm, besides being a truly horizontal communication mean. It's quite easy to find very strange (or rude) people here, but it's typically worth the trouble.
If you don't have configured Usenet access yet, I recommend the Eternal September free news server. Google groups also works, but I find its web-only interface quite bad. And Usenet is Usenet, it's not the web: use a proper client.
Here are some relevant groups:

Otherwise...

If everything else fails, drop me a message or come to see me in my office. I'm always happy to have a chat and (if you want) a coffee with a student or former student of mine.

I've also set up the unofficial DEVL mailing list in September 2008. It you think that the answer you need may also be useful to others, it may be the right place to ask. [The list no longer exists]


Back to my home page...


Luca Saiu
Last modified: 2011-08-15
Copyright © 2008, 2011 Luca Saiu
Verbatim copying and redistribution of this entire page are permitted provided this notice is preserved.