The command line is a text environment where you interact with a shell. Explore what that means, in this video.
- [Instructor] Most of us are familiar with using a computer that has a graphical user interface, or GUI. We're accustomed to seeing visual elements like scroll areas, images, buttons and dropdown menus. We can drag windows around, click links, and view charts or graphs. In a lot of cases, that's exactly what we want for photo editing, document layout, browsing the web, graphic design, watching movies, and playing games. But not all software requires a graphical interface.
Especially on servers, embedded applications and in many other areas, software runs without this graphical interface but we still need a way of interacting with a program if we don't have a desktop view to run our GUIs. Server software, utilities, and other programs usually only need some text-based information to do what they do. Many of these programs run on a server in a data center somewhere without a monitor so the overhead of a graphical interface is completely unnecessary. One way we interact with these programs that don't have, or don't use a GUI is through the command-line.
The command-line is a text-based interface where we type commands and direct text-based input and output to the screen, to files, and to other programs. The environment we use is called a shell, or command-line interpreter, and there are many shells out there. The command-line interpreter was one of the earliest ways of interacting with the general-purpose computer, starting in 1971 with the Thompson shell for UNIX. As UNIX evolved and came to be replaced in many capacities by Linux, the shell environments evolved too.
Bash, or the Bourne-again shell is one of the most widely-used shells and it's the one you're likely to need to become familiar with as you begin your command-line journey. Bash is the shell that comes enabled by default with most of the popular Linux distributions. It's also available on macOS and in Windows with the Windows subsystem for Linux. So I'll be using Bash throughout the course. But I encourage you to explore some of the other shells out there once you have a working foundation in Bash.
- Recognize what the characters “-h” represent in the statement “df –h/home/alice/Documents”.
- Explain how to recall a previous command in Bash.
- Identify what the command “ls -l” will show.
- Recall what is needed to use the find command to look for files by name, size, and so on.
- List the two modes file permissions can be set to.
- Recall why many command line tools are intended to be used in pipes with other commands.
- Explain what the command “grep -E "" report.txt” will show.
- Identify what the “>” symbol is often used for.