Accessing the Command-Line Interface
Learn how to access the command-line interface.
We'll cover the following
Overview
Getting access to the command-line interface, often called the shell, varies based on the operating system. Usually, we access it through a program called a terminal, short for a “terminal emulator.”
Launching terminal
If you’re on a Linux machine with a GUI, you can usually launch its terminal app with Ctrl
+Alt
+t
or by searching for a Terminal program in your list of programs. When the terminal opens, you’ll see something like this:
If we’re on a Linux machine with a GUI, we can usually launch its terminal application with Ctrl+Alt+t
or by searching for a terminal program in the list of programs. When the terminal opens, we see something like this:
root@Educative:~$
This is the prompt, and it’s where we enter commands. We’ll explore its meaning shortly.
To access the command-line interface on a Mac, we hold down the “Command” key on the keyboard and press “Space.” This brings up the Spotlight window. Next, we type terminal
into the box and press “Enter.” This launches the terminal program.
Interfaces
Windows 10 has a few command-line interfaces. The classic Command Prompt and the PowerShell interfaces aren’t compatible with the command-line interface on Linux, BSD, or macOS systems. They have their own commands and approaches to solving problems. So, we won’t be using those interfaces in this course. Instead, we’ll use the Bash on Windows feature for Windows 10.
To do this, we do the following:
-
Enable the Windows Subsystem for LinuxOne.
-
Download Ubuntu from the Windows Store.
It’s a free download that installs a version of Ubuntu on top of the Windows operating system, and Microsoft fully supports it. There are other flavors of Linux available, but we use Ubuntu in this course.