This course has been updated! We now recommend you take the Full Stack for Front-End Engineers, v3 course.
Transcript from the "Shells" Lesson
>> Jem Young: So now we'll talk about shells. What is a shell? I'll give you a hint. You just used one five seconds ago. Yes.
>> Speaker 2: Bash.
>> Jem Young: Yeah.
>> Speaker 2: Is the one that's included with a lot of Unix systems by default, but it basically allows you to run command lines.
[00:00:19] And run a lot of the basic systems that that come along with Unix.
>> Jem Young: Exactly right, good answer. The shell is just a command interpreter to interface with a system. Like I said, in the old days, the 80s, [LAUGH] I'm dating myself now. Not that long ago, that's all you had.
[00:00:40] You just had this blinking cursor when you sat down on a computer and is really intimidating and people are, what do I do? There's no easy way to figure out which commands you can run. Heck, you probably didn't even know which operating system you're on if you just sat down on a random computer.
[00:00:54] But shells are just a way of talking to the OS, to talk to the other applications talking to the system. The terminal is the application that we're in here. So I'm running iTerm which it's pretty popular. Some of you are probably running something different. If you're using Windows, you're probably using PowerShell or something like that.
[00:01:13] But Terminal it's just a wrapper on shell applications. And some of the more popular shell applications are Bash, that's what we're using today. Probably, we'll check in a second. ZSH is a really popular one. There's more, I won't go into all of them because they're not relevant. But Bash is the primary one that you're probably gonna see most often.
[00:01:37] And it's on every operating system that you need.
>> Jem Young: And, like I've said before, the shell is just that frontline that's the interface. It is a user interface of sorts, and it just talks to an application or the OS, which talks to the kernel. And the kernel is the core of the operating system.
[00:01:56] That's the thing that does all the work, it talks to the actual machine layer. So the great thing about using the shell is we're not that far removed from the actual code that's running underneath. Versus a GUI which is a few more steps removed. Because that's usually gonna talk to the shell in some sort or run commands in that way.
[00:02:13] If you wanna show the shell that you're in, you can type, echo $0. So let's try that now, echo, which echo just repeats what I'm saying. I want it to say $0, $ is just an expansion and that expands the 0 variable. And it says we're in bash.
[00:02:32] If you're not in Bash, you should let me know. You're probably in Bash though, unless someone told you to download something, you should use the SH. It's way cooler, which, again, I'm not gonna get into that debate today about which one is better. But we'll use Bash because it's standardized.