Back to Freecodecamp

What Is the Terminal, and How Does It Differ from the Command Line?

curriculum/challenges/english/blocks/lecture-understanding-the-command-line-and-working-with-bash/687e910842f3322350bc8d93.md

latest4.9 KB
Original Source

--description--

Let's learn about the terminal, and how it differs from the command line.

The command line is a basic text input interface which allows a user to enter "commands", usually in the form of a series of characters, and submit or execute them, usually by pressing the "Enter" key. You will most-commonly see command line interfaces within a terminal.

A terminal is a special application that offers a command line interface to perform system-level commands beyond the basic read/write operations. You may also hear about "terminal emulators", which are essentially applications that wrap a basic terminal interface to offer additional features or functionality. But for most general purposes, you are probably safe to refer to these as "terminals" as well.

Finally, we will also need to talk about "shells". A shell is the software that wraps the command line and interprets your inputs as commands, returning the output.

But how can you access the terminal on your system?

Well, if you are running a modern version of Windows, you will likely have two different options. Windows offers two distinct shell applications out of the box: Powershell and Command Prompt.

Both of these shells come with their own terminal applications (which share the name of the respective shell), so you can use your application menu to start either a Powershell terminal or a Command Prompt terminal.

Windows also offers a relatively new and modernized terminal emulator aptly named Microsoft Terminal.

You can install this application from the Windows Store, and are then able to launch it just like you would your Powershell or Command Prompt terminals. The advantage of the Microsoft Terminal is that it allows you to access both the Powershell and Command Prompt shells from the same application, as well as your respective Linux shell if you have configured Windows Subsystems for Linux.

MacOS offers a terminal that is aptly named "Terminal". You can access this through your spotlight search, or through your application launcher.

MacOS also offers support for third-party terminal emulators, such as iTerm or Ghostty. You can install these applications from their home pages.

On Linux, the default terminal (and how you launch it) depends highly on the distro and desktop environment you use. There's a lot of support for third-party terminal emulators, too. For example, you could set up kitty in Arch Linux - and you can launch it with an application manager such as wofi.

Linux arguably has the largest variety of terminal applications to choose from. Most of these can be installed through your distro's package manager.

The distinction between "terminal", "shell", and "command line" may seem rather pedantic at times. And for the most part, the terms can generally be used interchangeably. But it is important to know that they have specific meanings, and what each of those meanings are.

--questions--

--text--

What is a terminal?

--answers--

A basic text input interface for entering commands.

--feedback--

Think about how the lesson distinguishes between different components of command-line interfaces.


A special application that offers a command line interface for system-level commands.


Software that removes all user inputs in the command line.

--feedback--

Think about how the lesson distinguishes between different components of command-line interfaces.


The Enter key used to submit commands.

--feedback--

Think about how the lesson distinguishes between different components of command-line interfaces.

--video-solution--

2

--text--

Which of the following best describes a shell?

--answers--

A hardware component that displays text input.

--feedback--

The lesson explains what interprets your commands when you type them.


A special application that allows system-level commands.

--feedback--

The lesson explains what interprets your commands when you type them.


Software that wraps the command line and interprets inputs as commands.


A third-party terminal emulator.

--feedback--

The lesson explains what interprets your commands when you type them.

--video-solution--

3

--text--

On Windows, what advantage does Microsoft Terminal offer over traditional options?

--answers--

It's the only way to access the command line on Windows.

--feedback--

Consider what functionality Microsoft Terminal provides that the traditional Windows terminals don't.


It allows access to both Powershell and Command Prompt shells from the same application.


It's the default terminal on all Windows systems.

--feedback--

Consider what functionality Microsoft Terminal provides that the traditional Windows terminals don't.


It replaces the need for a shell entirely.

--feedback--

Consider what functionality Microsoft Terminal provides that the traditional Windows terminals don't.

--video-solution--

2