 Okay, a majority of my tutorials are based on bash, which is just one option when it comes to shells for your system. There's standard SH, which you'll find definitely on all systems, and especially strip down systems. Bash tends to be the default on many systems, stands for born again shell. There's lots of others. There's T shell, C shell, and I've actually been using Z shell on my system quite often. I just find that it has some very nice little features, which I may show some time on here. I try to go into bash on most of my tutorials just to make sure things are compatible, but Z shell seems to be fairly compatible with bash. I don't think I've run into any issues, although some of the bash tutorials I've done may not work in a standard shell. How do you know what shell you're working in, if you sat down at a system? Well, there's a number of different ways. I'm going to show you two different ways, and one might be a little bit better than the other. First off, we can go echo and dollar sign all capital shell. It's important that it is case sensitive. So we're looking at a variable here that's set probably already by the system. If I enter, you can see that I'm running the Z shell. It says it right there. I can also say echo dollar sign zero, which normally if you're within a script, that would show the first portion of the command someone ran when they ran your script, which would normally be the script name or the program name, which is exactly this case. We're not inside a program other than our shell here. So if we echo out dollar sign zero, it's going to show us the first part of that command, which should be our shell right there. In this case, it's giving a full path. There must be a link there. I didn't even notice that when I was thinking about doing this tutorial. But basically, the end part is the important part here if we're looking for what shell we are in. Now, if I was to move into another shell like SH, which I could run just by typing SH, now I'm in a very basic shell, and I was to echo dollar sign zero. It would show SH. Now, the reason it doesn't show the full path name is because it's looking at what I ran, and so I ran it SH here. Depending on how you start the shell up, it may display something different here, but the end should be SH if you're within the basic shell. But if I say echo dollar sign shell, all capital once again, it says Z shell. And that's because I went into the shell from another shell. So although this works, if you just went to a shell, if you go into another shell from within a shell, that may not work. But at that point, you probably already know what shell you're in because you're the one that started it up unless you're in a script that started up another shell. So again, I'll go into like bash, and I'll say echo dollar sign zero. And it will say bash because that's the command I ran. So it should, in theory, be the shell that you're in. But if I was to once again echo dollar sign shell, it's going to tell me I'm in the Z shell because bash is actually running within the SH shell. And the SH shell is running within the Z shell. So keep that in mind that both of these work. And there are other ways of doing this. Both of these will work. But this one will show you the top shell that you're in most likely. And but once again, if you're going into other shells from where you're at, then you probably already know what shell you're in. Now, this is also important why we have the shebang line in the scripts we write. So if I was to create a script, I'll just say 1.sh. I always say start the script off with your shebang line, which is like this. And this is basically telling it what shell you want to use as the interpreter. If you don't put that, the script will still run, but it will try running in whatever the default shell on your system is. And if you're writing a bash script and the default shell on someone's system is just the basic SH shell, it won't work right in many cases because they're different. And again, it's also really important if you're working with something outside of just a shell script like a Python script. A lot of people don't put the shebang line in there, and you can still start the script up by typing Python in the name of the script. But if you put the shebang line, they can do that, or they can just run the script and it knows, based on the shebang line, what shell it's supposed to be, or environment it's supposed to be. So that's just a quick little tip on figuring out what shell you're in. Like I said, I use, I thank you for watching. I hope you enjoy this little quick tip on finding out what shell environment you are in. Once again, those are just two ways of doing it out of many. But I thank you for watching. I hope you enjoy this tutorial. Please visit my website, filmsbychris.com. That's Chris with a K. There should be a link in the description. And I just hope you enjoy it. I hope you subscribe and comment and like. If you need any help, be sure to come to my site. Click on the dropdown to go to our IRC channel. And I'm in there often. There are many other people who might be able to help you. So try to avoid putting technical questions in the comments, because it's just so hard to continue a conversation within the comments on YouTube. Once again, thank you for watching. Please visit filmsbychris.com. That's Chris with a K. And I hope that you have a great day.