In this video, step away from the GUI and take a brief look at the command line, it's history, and why you want to use it when making your Angular applications—still going strong after all these years.
- The command line interface, also called a terminal, console, or command prompt, is a way of interacting with a computer using only the keyboard and text. There are no buttons or drop-down menus and you don't use a computer mouse. The command line dates back to the early days of computing before fancy graphics were invented, but it's still used today, and a lot of modern-day developers consider the command line a fast and powerful way to get things done. Many of the tools and techniques we'll cover in this course are designed to work only in the command line, and it's important for you to become familiar with how the terminal works.
Every terminal has an interface that translates the text you type into meaningful commands that the computer understands. This interface is called a shell. The most common shell in Angular projects is a Unix shell called BASH. Bash stands for Bourne Again SHell, and it was first released in 1989. Since then, developers have started using other shells like Z shell and FISH instead of BASH, but BASH is still the default shell on most Linux and MacOS systems.
BASH is also available on Windows-based computers, but it needs to be installed and enabled before you can use it. Windows 10 anniversary edition offers the native BASH on UBUNTU shell, but you can use any other option you want. If you're using a Windows machine, I recommend that you look up the installation or activation instructions for your version of Windows before continuing this course. You can find instructions right here in our library. There are hundreds of commands you can run from the terminal, but you'll only use a handful of them in your day-to-day work.
Most terminal commands follow a common pattern. You type the command, then you type any options, and then you type any arguments. The command is the program you want to run. Options change how the program works when you run the command, and arguments are the data you want to pass into the command when it runs. Every command is unique, and most come with a manual page, a man page for short, that shows you how to use the command. You access the manual page by going to the terminal and typing the command man followed by the command you want to learn about.
Here's an example. To learn about the ls command, you would type man space ls and hit Enter. To learn about the cp command, you would type man space cp and hit Enter. These are just the basics, and I recommend you check out our library for an in-depth look at everything you can do in the console.