Master the command line.
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
examples
.gitignore
README.md
Vagrantfile

README.md

Class: The Shell

Servers and Tools


In this class you'll learn about the command line. That includes the terminal and shell. We'll be using a shell program called Bash, the most common shell program on Unix systems (and Macs). The concepts will apply for other shell programs too. Along with learning about the shell, you'll learn some Unix operating system concepts.

What's in this class?

  • What is the Shell? - In this introduction we'll explore the terminal, the shell and the bash programs. You'll see the source code for bash and a quick history.

  • Setup - We'll use a virtual machine for the class so everyone can have the same environment.

  • Introduction to Commands - What is a shell command? Learn about how commands are invoked with arguments and options, how to navigate the man pages and the difference between a built-in command and a program that exists on the system. Explore the difference between a binary program and a script.

  • Common Commands - In this video you'll learn how to use some of the most common commands like ls, less, mkdir, cp, mv, clear, rm, touch and echo.

  • File Permissions and Info - Learn about the ls -l command that shows us file permissions, owner and size.

  • Environment Variables - Environment variables are sort of like global variables for programs. In this video you'll learn about local variables and environment variables and see how to set and unset them.

  • The PATH Environment Variable - Learn about the special PATH environment variable that bash uses to search for runnable programs on the system. Also learn how to change the path variable correctly.

  • Files in Unix - Learn the basics of files and file descriptors in Unix. Files includes regular files, like a text file, and devices like a printer or the console. These concepts are required in order to understand file redirection and pipes. You'll also learn about three standard file descriptors that are opened for every process: standard input (stdin), standard output (stdout), and standard error (stderr).

  • IO Redirection - Redirect standard input (stdin), standard output (stdout) and standard error (stderr) using special operators in bash.

  • IO Pipes - Unix pipes allow us to connect two programs together and send a stream of data from the output of one to the input of another. Bash provides a nice operator we can use to create pipes between programs. Pipes enable a Unix philosophy of creating small programs that do one thing really well, and composing larger programs out of smaller ones.

  • Script Programs - So far you've seen several examples of machine programs that are stored as 1s and 0s. You can also write programs or commands that run on top of an interpreter like Node.js or Ruby. Learn how to create and execute commands that use scripting languages.

  • The .bashrc File - The bashrc file can be used to store settings and initialize a bash environment. In this video I'll explain when the bashrc file is executed and show you around some of its features.

  • Extra Tricks and Other Resources - In this video I'll show you a few customizations and tricks that I use. I'll also give you some web resources to learn more about bash scripting.