Join 3,363 readers in helping fund MetaFilter (Hide)


Linux CLI Filter: Complete Linux Command Line Book?
March 6, 2013 12:09 PM   Subscribe

Is there a book (or a way to have one made) that would list all available Linux commands with options and what they mean for any shell I'm interested in learning? (Currently bash)

I know about man pages, which are great, but I'd really like something in hard copy form that I can take anywhere so I can brush up on CLI commands when I have a few spare minutes.

I'm guessing the commands are different for each shell, so that's a factor here as well, I think.

I only have desktop machines, but even if I had a portable, I'd prefer a book so I could, for instance, take it with me in either of my one and a half "reading" rooms where there are some "water hazards."

Perhaps smoosh all the output from the man pages into a single, formatted doc and have that printed at a print-on-demand joint online?

I had a pretty exhaustive reference that worked well for me when I was getting to know MS-DOS ages ago, so I'm wondering if there is something similar for Linux.

I have two Linux CLI books that I already use, but they only cover the basic commands.

And I know the GUIs are nice, but I'd prefer to learn the CLI.

Many thanks in advance!
posted by InsertNiftyNameHere to Computers & Internet (14 answers total) 4 users marked this as a favorite
 
Yuck, that double spacing is nasty. Sorry.
posted by InsertNiftyNameHere at 12:09 PM on March 6, 2013


Not sure how complete it needs to be for you, but Linux in a Nutshell is plenty detailed for me.
posted by lukemeister at 12:11 PM on March 6, 2013 [1 favorite]


RUTE is a bit old, but I remember it being... thorough.
posted by Wrinkled Stumpskin at 12:22 PM on March 6, 2013 [1 favorite]


Commands only differ by shell when it comes to builtins (and scripting of course). Everything else we call a "command" is just a program installed on the computer, which varies extremely widely by OS, distribution and machine, but not really by shell. Obviously there are commands that exist on the vast majority of Linux machines, and I'm sure that's what you're asking for (in which I think the Nutshell book is probably pretty good), but keep in mind there's no true "complete" list of commands.
posted by primethyme at 12:56 PM on March 6, 2013 [2 favorites]


For what it is worth, every shell has built in commands, but I find that much of what I do at the command line involves separate programs.

How many shells do you actually care about? Maybe for a start, print out the man pages for the shells you are most interested in. This would be an opportunity to learn about unix text formatting conventions. Man pages are typically distributed in some sort of marked up version that then gets formatted for screen or other output.

You will have to go elsewhere to find a list of useful command line utilities, but you could write a little shell script to go through that list and make PDFs of those for printing too.

Also, if you don't know it already: "man -k" does a keyword search of man pages which can be useful for finding commands to help with given task.
posted by Good Brain at 1:03 PM on March 6, 2013


Most available linux commands are non-shell executables (e.g. grep, awk, sed, etc.). These can be reviewed in any decent Linux book, but will switch focus based on what you want to do (developer/user, network admin, web server admin, etc.).

If you want to get more in depth on bash-only builtins and how the shell works try the Linux Documentation Project BASH beginner's guide (pdf). I'd say this is much more valuable in the long term than knowing every flag for grep.
posted by benzenedream at 1:03 PM on March 6, 2013 [1 favorite]


One more thing, from a shell 'echo $PATH' will give you a list of the directories search when you try and execute a command from the command line. If you ls each of those directories you will get a pretty comprehensive list of every command on your system, most of which will have man pages.
posted by Good Brain at 1:10 PM on March 6, 2013


Linux in a Nutshell is good enough. There used to be a book of every single man page of every command that a Linux distro might conceivably have. It was impractically large, and I haven't seen a copy for sale in 15 years, so would be almost uselessly out of date.
posted by scruss at 1:43 PM on March 6, 2013


I know you are looking for something in dead tree format, but keep in mind info is usually more extensive than the man pages.

On my system info bash brings up The GNU Bash Reference Manual, if you absolutely must have a book the good people in the GNU project will probably be able to sell or otherwise provide a nicely formatted print edition.
posted by Dr Dracator at 1:53 PM on March 6, 2013


I think you are misconceiving this project so let me clarify some things. Listing "all the commands and their options" makes as much sense as learning a language by reading a dictionary. Only worse than that because it's easier to add new commands than to get words accepted into a dictionary. Ages ago, with DOS it was a lot simpler. For one, there weren't all that many commands to begin with, and when you ran a program, even if you invoked it by name from DOS, you didn't conceive of it as a new command. The closest thing to new commands was a .bat file and they all ended with .bat to distinguish them from the commands.

Worse, in linux, commands can differ even in the same shell on different systems and some systems can have multiple commands with the same name and which one runs when you invoke it from the command line depends on which directory you're in and what $PATH (the variable that lists the directories to search to invoke a command) is at the moment.

That said, I like The Unix Programming Environment, not so much for information, or lists of commands, but for general orientation and how to think about using the command line, even if you never plan to write any programs.
posted by Obscure Reference at 4:37 PM on March 6, 2013


My personal favorite CLI bible is O'Reilly's Unix Power Tools.
posted by Celsius1414 at 8:32 PM on March 6, 2013 [3 favorites]


You might dig the Universal Command Guide. It's getting old, though.
posted by snuffleupagus at 4:28 PM on March 7, 2013


O'Reilly's Essential System Administration.
posted by cmdnc0 at 5:56 PM on March 7, 2013


WOW! So much great info here. Thanks a ton, folks! I really appreciate you taking the time to help a guy out.

And I can't choose a particular best answer because I consider them all tied for the best.

And, FYI, for anyone who cares, I chose to order "Linux In A Nutshell" and "Running Linux." I will definitely put the other recommended books on my wish list, though.

Thanks again.
posted by InsertNiftyNameHere at 8:37 AM on March 10, 2013


« Older Mr. Motion and I are getting r...   |  Does Lucid Dreaming or Maxalt ... Newer »
This thread is closed to new comments.