Introduction
”And you may ask yourself, ’Well, how did I get here?’” – Talking Heads (Once in a Lifetime)
This is my little ”Linux and Bash in 10 steps” guide. It’s based on what I consider the essentials for floundering around acting like I know what I’m doing in Linux, BSD and ”UNIX-flavored” systems and looking impressive among people who have only worked on Windows in the GUI. Your ”10 steps” may be different than mine and that’s fine, but this list is mine.
I said ten things, but I lied, because history is really important, so we will start at step #0. And since this is before even that I guess that means this is a 12-step program…
Here is what we’ll cover in the rest of this book:
- Some History – UNIX vs. BSD, System V vs. BSD, Linux vs. BSD, POSIX, “UNIXlike,” Cygwin, and why any of this matters now, “Why does this script off the internet work on this system and not on that one?”
- Come Out of Your Shell – sh vs. ash vs. bash vs. everything else, ”REPL”, interactive vs. scripts, command history, tab expansion, environment variables and ”A path! A path!”
- File Under ”Directories” – ls, mv, cp, rm (-rf *), cat, chmod/chgrp/chown and everyone’s favorite, touch.
- Finding Meaning – the find command in all its glory. Probably the single most useful command in ”UNIX” (I think).
- Grokking grep – and probably gawking at awk while we are at it, which means regular expressions, too. Now we have two problems.
- “Just a Series of Pipes” – stdin/stdout/stderr, redirects, piping between commands.
- vi (had to be #6, if you think about it) – how to stay sane for 10 minutes in vi. Navigation, basic editing, find, change/change-all, cut and paste, undo, saving and canceling. Plus easier alternatives like nano, and why vi still matters.
- The Whole Wide World – curl, wget, ifconfig, ping, ssh, telnet, /etc/hosts and email before Outlook.
- The Man Behind the Curtain – /proc, /dev, ps, /var/log, /tmp and other things under the covers.
- How Do You Know What You Don’t Know, man? – man, info, apropos, Linux Documentation Project, Debian and Arch guides, StackOverflow and the dangers of searching for “man find” or “man touch” on the internet.
- And So On – /etc, starting and stopping services, apt-get/rpm/yum, and more.
Plus some stuff at the end to tie the whole room together.
The most current release of the book should always be available for download in different formats on GitHub1 .