You just began to learn a programming language and you notice that in some videos or articles, this screen shows up:
And you may have been asking yourself: what is that?
The image above is a combination of two things: a shell and a terminal. Let's discuss the shell concept, first.
Shell
We can define a shell as a command interpreter, that enables the user to interact with the Operational System.
This mean we can execute commands for a whole bunch of stuff:
-navigate and interact with folders and files,
-execute applications,
-even create functions!
And so much more...Awesome, right?
GUI vs Shell
However, you may say that with the exception of creating functions, you already do the other things, with your mouse.
You are correct. Which are possible thanks to the Graphic User Interface (GUI).
Although, I would like to emphasize some of the benefits of using the shell instead of the GUI:
-It might take some time to get used to. However, once you get the feeling, using a shell allows you to be much faster. And consequentially more productive.
-You may need it to interact with a remote server. The interaction might only be possible through the shell.
-GUI is a layer upon other things, but also upon the shell. This means that the GUI was designed to facilitate user interaction with the computer. Therefore, it's an opinionated abstraction.
So, not only all the GUI commands can also be executed through the shell, but you also get so much more possibilities to interact with the computer.
I'm not saying that "GUI is a bad thing" or "you need to stop using the GUI", or the classic "through your mouse away, you don't need it".
I'm just trying to grasp your attention for the shell existence and the importance of learning and getting used to it.
Trust me, will be a benefit for your developer career.
The trick here is to use one or another in a fashion that is more productive to you.
Shell multiple faces
If you use Windows, you may have seen this terminal, instead:
That's okay. There is a bunch of different types of shell. You can even change the default shell of your system.
Another popular shell example is Bash:
Which is the default shell of the GNU operating systems.
Just out of curiosity, the current shell that I use in my PC is ZSH, through the oh-my-zsh framework.
Commands Examples
- cd: which means change directory;
- ls: list the content of a directory;
- mkdir: allows you to create a directory;
- rmdir: remove a directory;
And so much more!
Terminal
If the shell is a command-line interpreter and allows us to make a lot of things, what is the terminal role?
Basically, a terminal executes the shell applications. It's a wrapper around the shell.
For example, in my local machine, I use the shell zsh and a terminal emulator named Terminator. This allows me to run my zsh commands.
Technically, today in our personal computer, we use terminal emulators
And so much more...
Like anything in computer science, there is a lot to cover. But, at least, now you understand a little more about this popular black screen.
Top comments (0)