- Published on
Understanding the difference between Shell and Terminal
- Authors
- Name
- hwahyeon
Shell and Terminal are technically different concepts. A Shell is a command interpreter, while a Terminal is a user interface that allows interaction with the Shell or other programs. (However, people often refer to the Terminal screen simply as the Shell in everyday usage.)
When you enter a command in the Terminal, it is the Shell's responsibility to interpret and process it. The Shell either handles the command internally or converts it into a format that the operating system can understand. Since the computer cannot directly understand the command entered by the user, the Shell acts as an intermediary, converting it into a system call format.
For example, cd
is an internal command that the Shell processes directly. When a user enters cd /home
, the Shell changes the current working directory to /home
and immediately reflects the result. In contrast, external programs like ls
operate differently. When a user enters ls
, the Shell checks the PATH environment variable to locate the ls
program and requests the operating system to execute it. The executed program generates a directory listing, which the Shell then outputs to the Terminal.
Internal commands are handled directly by the Shell itself, while external programs are executed through the operating system, making them distinct in their operation. However, in both cases, the final result of the user's command is displayed in the Terminal.
There are various types of Shells, and each may interpret commands differently or offer slightly different features. However, most of them operate in similar or identical ways. One of the most widely used Shells is bash (Bourne Again Shell). Bash is the default Shell provided by many Unix-based operating systems and is commonly used as the default Shell in several Linux distributions, including Ubuntu.