What’s In (and not in) This Book

In Chapter 1, Getting Your Feet Wet, you’ll get a quick tour through some of the most useful parts of the CLI. You’ll navigate around the filesystem, run commands as a superuser, learn to install a few programs you’ll use in the book using the package managers, create files, learn about streams of text, and learn how to use the help system.

Next, in Chapter 2, Creating an Ubuntu Virtual Machine with VirtualBox, you’ll create an Ubuntu virtual machine you can use to practice the commands in the rest of this book. While you don’t have to follow this chapter, using virtualization is a great way to practice. You’ll create the virtual machine, install the Ubuntu operating system, and take a snapshot, so you can restore your environment if something goes wrong.

Chapter 3, Navigating the Filesystem, lets you get comfortable moving around the filesystem on the command line. You’ll learn where to look for things and how to get around quickly using absolute paths, relative paths, and a few handy shortcuts. You’ll also learn where to find things on a Unix-like filesystem, and how to find how much space is available on your filesystem.

Next, in Chapter 4, Working with Files and Directories, you’ll work with files and directories. You’ll expand on what you learned in the first chapter, and do more advanced operations in more detail. You’ll concatenate files, read larger files, and manage permissions. You’ll move, rename, and copy files and directories, learn about links, and learn about the filesystem itself. You’ll learn how to find files quickly, and how to identify file types.

In Chapter 5, Streams of Text, you’ll dive deeper into redirecting program output and use grep to filter the output. You’ll learn how to redirect output to another program, and learn the difference between STDIN, STDOUT, and STDERR. You’ll learn about the sed stream editor, xargs, and awk.

In Chapter 6, The Shell and Environment, you’ll accelerate your workflow by making customizations to your command-line environment. You’ll create a custom prompt that tells you information about your session. You’ll create aliases for complicated commands so you can type fewer keystrokes. You’ll create configuration files that let you start your session with the customizations you make, and you’ll learn how to set environment variables you can refer to later in scripts or applications.

In Chapter 7, Running and Managing Programs, you’ll explore additional ways to run programs, leverage your command history to reuse commands effectively, and explore subshells. You’ll also manage the processes running on your system and run programs in the background.

In Chapter 8, Networking Tools, you’ll use command-line tools to look up IP addresses and domain names, fetch files and interact with web APIs, transfer files with scp and rsync, inspect open ports, and do low-level network communications with netcat.

In Chapter 9, Automation, you’ll reduce repetitive tasks and create workflows. You’ll use make to build a very basic static site generator that wraps content with headers and footers. Then, you’ll use Bash to create an interactive script for creating a web project.

In Chapter 10, Additional Programs, you’ll explore a handful of tools that can improve how you work. You’ll use ranger to navigate and manage files and direnv to set environment variables for specific projects. You’ll use some Python CLI tools to keep a journal of your work, run a basic web server, and view source code with syntax highlighting. You’ll use jq to process JSON, manipulate documentation with pandoc, run commands when files change with entr, and work with APIs with Siege and HTTpie.

Finally, you’ll find two appendices in the book as well. Appendix 1, Command Quick Reference, provides a list of the commands used in this book. Appendix 2, Installing GNU Utilities on macOS, explains how to install the GNU versions of many of the tools in this book on a Mac.

But you also won’t find a few things in this book. First, there are a ton of commands available, and this book won’t cover them all. I’ve selected the tools in this book based on research, interactions with students in classes and workshops, and personal experience. In addition, you’ll use only a handful of options for each tool, with the assumption that you’ll explore other options on your own. You’ll use the Linux versions of these tools, rather than the BSD versions found on OpenBSD or FreeBSD.

I’ve also left out a few tools that I think are fantastic, but aren’t a good fit. This book won’t go into using alternative shells, it won’t go over Windows or PowerShell command-line tools, and it doesn’t spend time using tools like Vim, Emacs, or tmux. You also won’t work with Git in this book, except in one case when you’ll use it to download and install another tool. When you need to use a command-line based editor, you’ll use nano. When talking about running something in a detached terminal, you’ll use screen. If you know how to use something different, you should feel comfortable doing so.

You’ll work with real-world examples of useful tools that will accelerate your work, and you’ll find exercises to practice them. When you’re done, you’ll know where to go next to learn more about each tool.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
18.216.151.164