Difference between Command, Terminals and Shell

Now, in this article, you’re going to learn the difference between commands, the terminal and something called the shell.These are very important distinctions that will underpin basically every single thing that you do on the command line.

Let’s go ahead and get into it.

So what is actually going on when we type a command? Well, to understand this, we need to know the difference between a command and something called the shell.The commands are just text, but when you press enter, the meaning of that text is interpreted by a computer program called The Shell.

OK, so let’s take a real world example.

If we see the word here on the left, Raspberry’s on a physical level.

That word is just the letters are a RASPBERRY’S and just like any other word, if you can’t read the language, it won’t mean much to you. Right.

But if you took this word and you could, for example, read English, then what would happen is you would you would see that text and you would interpret it for meaning. And what might come out is this fruit.

Like, you’d see that text and you would match it with this fruit, the raspberries.

But there’s a process in the middle of interpreting that text into specific meaning, and that is the job of the shell. So the shell is that interprets that text can give it different meaning and that is exactly the same on your computer.

So what about the terminal then?

We now understand the difference between a command and the shell.

So what’s the terminal for? Well, the terminal is nothing more than just a window into the shell. So let’s make this a bit easier to understand. So if I asked you, how would you type commands onto your shell without opening the terminal?

Well, you couldn’t, right, and that’s exactly what the terminal is, the terminal, Kind of like the middle piece in between using come out in between typing commands and submitting them to the shelf.

You can’t really type commands anywhere unless you open the terminal and that’s all it is.

What you’re doing is you’re typing commands in the terminal and you press enter and then they are submitted to the shell. So the terminal is kind of like the middle piece, OK? and there are actually different types of shells.

So the different types of shells, just like there are different types of human languages, can actually interpret the same command in different ways. But fortunately, there is one type of shell which has been which is the most common type, which is called the Bash shell.

So if you’ve ever heard the term bash shell scripting or Bash scripting or something like that, it means writing programs and writing scripts that can be read by the Bash Shell. Now, Linux most distribution use the base, Shell and Ubuntu definitely does by default. So that’s something to bear in mind, that there are different types of shells on Linux. They can interpret commands in different ways, but the most common one is the bash shell.

So there we are. We’ve got some standardization there.

So to summarize, commands are really just the text that you type in the terminal.

And when you press enter, that text is interpreted by the shell.

Now, the Shell is a program that translates that text into into actions for the computer, this means that different shells can actually interpret the same text differently, which might cause some problems.But fortunately, most Linux machines use the bash shell.So there is consistency across most machines.

And as we said as well, the terminal is just a window to the shell.It just it’s just the middle piece that allows you to type your commands and submit them to the shell.

And as a bonus piece of information, your commands are actually also case sensitive. So if you type a command in all uppercase, if the shell isn’t expecting to see that, it will probably give you an error. So you need to make sure that things are spelled in exactly the correct way, which has the benefits of allowing you to have more more options because slight differences can give different functionality.

But it means you have to be really careful on how you actually type your commands if you want them to work the way you want them to.

That’s all folks, Enjoy !!

Keep learning.. Keep Sharing !!

Leave a Reply