Appendix A. The Terminal

As a developer, it’s helpful to be familiar with the terminal (also known as the command line or command prompt). The terminal is a text-based way of interacting with your computer, and is commonly used by programmers, system administrators, and network administrators. Though it is certainly possible to be an effective programmer without ever using the terminal, I believe it is an important skill to have: many tutorials and books assume you’re using a terminal, and many tools are designed to be used on the terminal.

The most ubiquitous terminal experience is a shell (terminal interface) called bash, and it is available by default on Linux and macOS machines. While Windows has its own command-line experience, Git (see Appendix B for installation instructions) provides a bash command line, which I recommend you use. In this book, we will be using bash.

On Linux and macOS, look in your programs for the Terminal program. On Windows, after you install Git, look for “Git Bash” in your programs.

When you start the terminal, you see a prompt, which is where you will type commands. The default prompt may include the name of your computer or the directory you’re in, and it will normally end with a dollar sign ($). Thus, in the code samples in this book, I will use a dollar sign to indicate the prompt. What follows the prompt is what you should type. For example, to get a listing of the files in the current directory, type ls at the prompt:

$ ls

In Unix, and therefore ...

Get Learning JavaScript, 3rd Edition now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.