Oakland.pm

Reviews

Review of "Linux in a Nutshell"

authors: Ellen Siever, Stephen Figgins, Aaron Weber

reviewer: George Woolley


Short Review

Linux in a Nutshell, 4th Edition
A Desktop Quick Reference
By Ellen Siever, Stephen Figgins, Aaron Weber
4th Edition June 2003
Series: In a Nutshell
ISBN: 0-596-00482-6
944 pages, $39.95 US, $61.95 CA, £28.50 UK

Notes:

A very good book. :) :) :) :) of 5.

This is a very good O'Reilly Nutshell book. If you are familiar with O'Reilly Nutshell books like "Unix in a Nutshell" and "Perl in a Nutshell", that may be all you need to hear.

But perhaps you are not familiar with O'Reilly Nutshell books. They are concise comprehensive practical references on some technical topic. They are, however, not tutorials. O'Reilly has been publishing this series for a lot of years and the Nutshell books are generally really good. IMO this one sure is.

If you want more detail, you could take a look at my somewhat longer review.

George Woolley of Camelot.pm and Oakland.pm

Miscellaneous

Chapter Titles

  • 1. Introduction (11)
  • 2. System and Network Administration Overview (19)
  • 3. Linux Commands (465)
  • 4. Boot Methods (39)
  • 5. Red Hat and Debian Package Managers (36)
  • 6. The Linux Shells: An Overview (4)
  • 7. bash: The Bourne-Again Shell (47)
  • 8. tcsh: An Extended C Shell (45)
  • 9. Pattern Matching (6)
  • 10. The Emacs Editor (16)
  • 11. The vi Editor (34)
  • 12. The sed Editor (11)
  • 13. The gawk Scripting Language (14)
  • 14. RCS (16)
  • 15. CVS (46)
  • 16. Graphical Desktop Overview (2)
  • 17. GNOME (21)
  • 18. KDE (44)
  • 19. An Alternative Window Manager: fvwm2 (20)

Notes:

  • To view the full table of contents, visit the O'Reilly catalog entry for this book.
  • The number in parens is the number of pages in the chapter.

Major Areas

  • commands (1)
  • system administration (3)
  • shells (3)
  • text manipulation (5)
  • source control (2)
  • window managers (4)

Notes:

  • These are the major areas covered from my perspective.
  • The number in parens is the number of chapters in the area.

Comparison to Unix Nutshell

Area Unix
in a Nutshell
Linux
in a Nutshell
Commands 1 chapter similar
1 chapter
System Admin no chapters 3 chapters
Shells 3 chapters similar
3 chapters
(bash, tcsh)
Text Manipulation 6 chapters similar
5 chapters
Text Formatting 6 chapters no chapters
Software
Development,
Source Control
3 chapters similar
2 chapters
(CVS)
(no make)
Desktops no chapters 4 chapters
Other 1 chapter
+ contents
+ index
+ glossary
+ 2 appendixes
similar
1 chapter
+ contents
+ index
(no glossary)
(no appendixes)

Notes:

  • The comparison is with "UNIX in a Nutshell: System V Edition", 3rd Edition, published in 1999.
  • The two books serve a similar function and have a similar structure but have many differences even at this gross level.

Penguin

penguin

Notes:

  • This is one of the penguin Logos Linus Torvalds says he likes.
  • It is used with permission provided I acknowledge Larry Ewing (lewing@isc.tamu.edu) and The Gimp, if anyone asks.
  • But why include a penguin? Because the penguin represents Linux and because the penguin is fun. Hey, the image of the Arabian horse on the cover of this book is way kool; but where there is Linux, there should always be at least one penguin!

Somewhat Longer Review

Contents

Notes:

  • My initial reading of this book was online using Safari.
  • If interested in having access to technical books online, click on the image above. Or see my review of Safari.
  • I've been using Safari for over a year since I wrote the review, and continue to recommend it.
  • As of 2004-06-15, there were 2,289 books on Safari.

The Title

what is linux?: The word Linux is sometimes used narrowly to refer to an open source core operating system or kernel that was originally developed by Linus Torvalds, has a reputation for speed and stability and powers many web servers.

The word Linux can be used more broadly to refer to the kernel referred to above plus all the other software distributed with it (which varies by distribution). The distinction implied by these two uses of the word Linux is sometimes dealt with by referring to the Linux kernel and Linux distributions.

Generally, Linux distributions include a great deal of software from the GNU project of the Free Software Foundation. Because of this and certain historical reasons some prefer to refer to GNU/Linux.

A third intermediate use of the word Linux refers to the kernel and the software most closely associated with it. Unix and Linux are often associated with a command line and text manipulation. In this sense Linux could be thought of as including

  • the Linux kernel
  • a file system(s) and other OS components outside the core
  • a shell or shells
  • the X Window System
  • a desk top (or window manager) or desk tops
  • various commands and utilities, especially for manipulating text

Some things that are not included are:

  • most graphical tools (e.g. GIMP)
  • programming languages (e.g. Perl, e.g. Java)

Linux is referred to variously as

  • a version of Unix
  • derived from Unix
  • Unix-like

I tend to think of Linux as a version or flavor of Unix, but from a legalistic point of view this is not correct.

what is a nutshell book?: O'Reilly Nutshell books

  • document the details of a topic or technology area
  • are comprehensive but concise
  • are not tutorials
  • are useful for getting a quick answer

"Unix in a Nutshell" is particularly relevant to this book as it covers similar ground.

how well does the title fit?: The book is certainly focused on Linux. But in what sense? Roughly, in the intermediate sense described above. However, the book does not cover the X Window System. This book is focused on usage; it does not explain the internal operation of Linux. However, the users the book has in mind are programmers and system administrators as well as normal users.

The book is a very good example of an O'Reilly Nutshell book. It provides comprehensive and concise info on Linux and it is well organized for obtaining quick answers.

The book is in many ways similar to "Unix in a Nutshell". However, it is more comprehensive.

About the Reviewer

unix/linux: I tend to think of Linux as a flavor of Unix. I've been using Unix since 1989.

Starting in 2002, Linux has been my primary OS. I've been using SuSE Linux; currently, I'm running SuSE 9.0 Professional. I've done a lot of software development in a Unix/Linux environment. Since I started using Linux heavily, I've done a lot of website development on it.

I've done much development of self-teach manuals for Unix. I've also taught introductory Unix. And I was a co-author (among many authors) of the first edition of "Unix Made Easy".

nutshell books and o'reilly: For years I've used various editions of O'Reilly's "UNIX in a Nutshell" as a reference. In fact, I still have a copy of a 1990 edition, "for old times sake". I also own and use "Perl in a Nutshell". And I own at least 3 other O'Reilly Nutshell books. So I'm quite familiar with the value of Nutshell books.

I own and use many O'Reilly books. You could say I'm an O'Reilly fan.

basic applications: On my Linux boxes, I use bash for my shell, KDE for my window manager and vi for my editor. I'm satisfied with all three. I have minimal knowledge of the alternatives.

And I'm a Perl nut. I rarely use gawk.

I don't have any experience using CVS.

type of usage: The book is intended for users, programmers and system administrators.

I'm a user. Hey, I use a Linux box as a personal computer. I use it for my email and such.

I'm also a programmer. I have lots of experience programming, and I've been using a Linux box for web development which has included writing CGIs and all sorts of programs to support my web development.

I am not a system administrator. I've never had a job with that title or function. I have done a little bit of system administration. For example, to support the two Linux boxes I have at home. For example, when teaching hands-on courses in a Unix environment.

so?: So, you may wish to filter what I say about this book through a bit of knowledge of my perspective and experience.

What You Get

OK, in this section of the review, I'll briefly say for each of several areas

  • what the book includes in that area
  • what, if anything, I learned that I expect to make use of in the near future

commands: This area consists of a single chapter that describes over 500 commands. The chapter takes up a little more than 1/2 the body of the book.

In some cases, the entry for a command refers to a different chapter of the book. For example, the entry for vi is primarily a reference to chapter 11.

Given the large number of commands, not surprisingly, there were more things of interest than seems appropriate to list here. Here's a few of them:

  • ls -lk to list number of K bytes rather than bytes for file size
  • ls -A to list all files including hidden files except for . and ..
  • df -h for human readable space measurements of file systems (e.g. 37G)
  • df -T to see the file type of each file system (e.g. reiserfs)
  • hexdump foo to see a hexadecimal dump of the file foo

system administration: This area consists of chapters on

  • an overview of system and network administration
  • boot methods
  • package managers (Red Hat and Debian)

While I found these chapters interesting, I didn't find much in them that I'm likely to apply any time soon. My system administration needs are very simple. More specifically

  • both my Linux systems are single boot systems with only Linux on them.
  • almost all of my software upgrade needs are satisfied by a graphical tool provided with my distribution.

shells: This area consists of

  • an overview chapter on Linux shells
  • a chapter on the bash shell and one on the tcsh shell

I now normally use the bash shell as my shell so that's what I focused on the most.

I learned of some filename metacharacters that I expect to come in handy:

  • ~- may be used to refer to the previous directory
  • matching braces may be used to specify alternative sequences
  • either ! or ^ may be used at the start of a character class to indicate that the character must not be any of the characters that follow

Here's an example of each of the above

example action
cd ~- changes directories to the previous working directory
ls *{mm,pg,pr}.html lists files ending in mm.html, pg.html or pr.html
ls [^r]*.html lists files starting with a character other than r and ending in .html

I also learned how to change the editor for command line edit mode (to vi) using set -o vi.

text manipulation: This area consists of chapters on

  • pattern matching
  • three editors: Emacs, vi and sed
  • a scripting language: gawk

I've been using vi since 1989, and it's still my editor of choice in a Unix/Linux environment; so the vi chapter is the most relevant to me. (Actually, what I use is vim.) I do a lot of substitutions in vi and I use grep and egrep regularly; so the chapter on (regular expression) pattern matching is also very relevant. However, I basically don't use Emacs, sed and gawk; so the chapters on them are only a tad interesting to me.

Even though I've been using vi for years, I learned numerous things from the vi chapter. Here's two

  • in command mode, a % finds the matching parenthesis, brace or bracket corresponding to the current character
  • in command mode, :x writes the file if it has changed and exits vi.

source control: This area consists of chapters on two different mechanisms for source control

  • RCS
  • CVS

RCS is the simpler and older program. In the past, I was called on to use it, but in very simple ways; and, in any case, I hadn't used it in some time and had forgotten most of what little I had known earlier. By referring to the RCS chapter, I was able to do such things as

  • check files out, edit them and check them back in
  • display the differences between different versions of a file
  • display a log summarizing the changes made to a file under RCS source control

Nothing earth-shaking, but when I finished going through the chapter and trying the various commands listed there, my understanding of RCS was way better than when I used it before.

After reading the RCS and CVS chapters, I concluded that RCS is more appropriate for my current needs. It handles my current needs fine and seems much simpler than CVS.

window managers: This area consists of

  • an overview chapter on graphical environments for Linux
  • a chapter on the KDE desktop environment and also one on the GNOME desktop environment
  • a chapter on the fvwm2 window manager

A window manager (duh) mostly just manages windows on the desktop, for example, it would determine which window is currently accepting input. A window manager might also provide a task bar or a control panel.

A desktop manager is more ambitious. It endeavors to provide a complete experience and so provides programs you are likely to want or need such as an office suite, a text editor, and even games. This book does not address the usage of these additional programs.

Since I use KDE I got the most out of that chapter. Things I read there motivated me to use the KDE Control Center to do the following

  • make some changes to the login screen
  • modify how the spell checker does it's work
  • add sounds to some system notifications
  • correct the system time

so what?: One point is the book really covers a lot of ground. Another is that I found the information to be useful; and you may too.

A Good Reference?

The book covers a lot of ground. But is it a good reference? To get a better feel for this I used the book to research the following questions. (Actually, I already had a pretty good handle on the answers.)

question
researched
result
In bash, what's the syntax for an assignment statement? I looked up bash in the index. There was no subentry for assignment but there was one for syntax. I looked through the specified 8 pages and found the answer :), but not until I reached the bottom of the last page. :(
In tsch, how do aliases work? I looked up tsch in the index, but there was no subentry for aliases. So I looked up aliases in the index, and there was a subentry for tsch. I looked at the specified page and the one following and found the answer. :)
How does one specify the sort order in the sort command? I looked up sort in the index and found instead an entry for sort command. I looked at the specified page and the one following and found the answer. :)
How can I display a file in hex? I looked up display in the index (probably a dumb idea) and didn't find what I was looking for. So I looked up hex in the index and found instead an entry for hexdump command. I looked at the specified page and found the answer. :)
In vi, how can I show the line numbers of lines? I looked up vi in the index and there was a subentry for line numbering. I looked at the specified page which did have some related information but not quite what I was looking for. :( Then it occurred to me that vi uses ex for that functionality. So I looked up ex in the index but there was no subentry similar to line numbering. :( However, there was a subentry for :set command which I thought would have what I wanted. I looked at the specified page and the page following and found the answer. :)
In KDE, how can I change the look and feel of windows? I looked up KDE in the index and found instead an entry for KDE desktop which had a subentry for look and feel. I looked at the specified 11 pages which all had to do with look and feel and were well organized. Not everything related to windows but much of it did. Anyway, I found the answer. :)

My conclusion is that the book is quite good as a reference.

suggestions: I suggest not giving up on a search just because you aren't immediately successful finding what you are looking for. A couple of the searches above began with failures but eventually succeeded.

If possible, I suggest you at least scan the book to familiarize yourself with its structure and content. My familiarity with the book seemed to help me above, especially in formulating questions and in knowing not to give up easily.

Oh yeah, and I suggest using what you are familiar with already to help you find things. Using what I knew sure helped me above in the search for how to get line numbers to display in vi.

Hey, they're only suggestions, OK?

Gripes

I really didn't find much to gripe about in this book. But below are a few things.

more examples: There were just 3 examples given for the use of bash filename metacharacters. And the three examples were all focused on very familiar features.

I would have appreciated a few examples of some of the less familiar features. For the kind of examples I have in mind, see the examples of filename metacharacter usage above in the "What You Get" section.

material I wouldn't normally use: I use KDE, bash and vi; and I use Perl for most programming. So I'm not likely to refer to the chapters on: GNOME or fvwm2; tcsh; or Emacs, sed or gawk. I could do without these 6 chapters.

Also, many of the commands included seem esoteric to me.

This is not much of a gripe because

  • I may occasionally need to use them.
  • I may wish to investigate what I'm missing.
  • I don't really wish to deprive others who do use them.

Besides, it's not like the book is bloated (though it's certainly not a slim volume) or like there's much else I'm burning to have included.

cvs chapter hard: Once I got past the overview material in the CVS chapter and into the reference material, I found the chapter difficult to follow. But I don't know CVS and this is a reference (not a tutorial), so that's reasonable.

index could be better: There's a wealth of information in this book. But to use it as a reference, you need to be able to find the information. The index is quite good, but I think it could be even better. See the occurrences of :( under "A Good Reference?".

Who's the Book for?

users: I use Linux for all sorts of things including email, browsing, and website development among other things. I now consider this book an essential reference for using Linux.

programmers: For a while I had a job doing nothing but Perl programming in a Unix environment. There were 5 books that I considered so essential that I had a copy at home and a copy at work. One of the 5 books was "Unix in a Nutshell". "Linux in a Nutshell" serves a similar function, but

  • of course, it focuses on Linux
  • it's an even better book (IMO)

system administrators: I don't have any reason to say this book wouldn't be useful to system administrators. However, I'm not the right person to make such a judgment.

Final Thoughts

The O'Reilly Nutshell series has a long (in Internet years) and successful history. The Nutshell format is very effective.

And this is an especially good Nutshell book. It's concise, covers a lot of ground and is just what I (and perhaps you) need in a Linux environment.

If you work in a Linux environment, I recommend getting this book.

Last Updated: 2004-06-21