 There's going to be a quick video on shell script history. Your shell's history, which most desktop systems will have. Some later systems, like if you're working on a router or something like that, probably don't have a stored history. You'll be able to go back in your current session, but not previous sessions. And you see I have two shells open here. The top one is Z shell, which is my normal shell. And the bottom one is the bash shell, which is probably the most common shell for Linux users. And there are some differences on how the history is used for both of them. And I'm going to go over some of the differences. So first off, you may have seen me do in previous videos where I brought up previous commands. Something you can do in both of them is I can hit up arrow, and it starts going through all my previous commands. I can hit down arrow and do the same to go forward in the commands. Bash does the same thing. Something that works a little different, though, is if I was to type E here and then hit up in bash, it does the same thing as it did before. Here in the Z shell, if I hit E and I start hitting up, it's only going to start bringing up commands that start with E or whenever I start typing. So I can type in NM and I can start hitting up, and it's only going to show me commands that I've previously typed that start with NM, which is pretty nice. So right here, basically all NMAP commands. So all I had to do was type NM and start going back. But that can be confusing if you're coming from bash and you start typing command and decide you want to go back in history, and all of a sudden it's not bringing up your previous history. It might confuse you. It's very nice once you get used to it. If you wanted to search through your history, you can use the control R command, and now I can start typing. So for example, I'll go down in the bash shell here, I'll press control R, and I'll start typing NM, and I didn't have any commands. I don't use bash that much, so my history is kind of short. Let me try again. I'll type in LL. And here it brought up a command that I typed echo shell because I typed LL. Now I can continue to press control R and it's going to go through all the different commands I've typed that have the letters LL in them. Up here in the Z shell, it's a little different in that it's not case sensitive. So if I press control R and I can type in NM lowercase, you can see here it brought up a YouTube video link that I have that had a capital NM, where bash wouldn't have brought that up because of the capital N in there. So Z shell, at least how I have it set up, is not case sensitive, where bash is going to be by default. Also note that they have two different histories. If I start scrolling up through my history commands here in bash, you'll see that the commands are different than if I was to do up here. And actually we can quickly look at that. So if I type in history and hit enter, Z shell, it will list out my history for Z shell and if I type in history down here, you can see one, my history goes back. I currently have over 8,000 commands because I use Z shell all the time in my history, where bash I've only typed 224 commands and they are different commands. Where are these commands, where are these histories saved? Here saved inside our home directory, I can cat out that file which displays the file to the screen and I can say dot Z shell history and there is my Z shell history and if I do the same thing down here, I can do it in either one because it's just catting out a file, I can say dot bash underscore history and I'll put out that command. You'll also notice that the Z shell actually looks like a timestamp of some sort which the bash does not by default. So they store things in different places and in different ways and you can look through them again by typing history, we'll show you the history or you can cat out that file either way. So I hope that I showed you some things, I'm trying to think if there's anything else I want to show. So control R to search through the history, Z shell is case insensitive, you have it set up like I do anyway and I hope that that gave you a quick overview of that. Thanks for watching, please visit FilmsByChris.com, that's Chris Decay, there should be a link in the description. This is part of a series if I didn't already mention that, hopefully there's an annotation on the screen if I'm not lazy or there's a link in the description of this video to the full playlist, be sure to check that out. Adding videos weekly, be sure to like, subscribe, share if you want to be a supporter, go to patreon.com forward slash metalx1000, your support is much appreciated even if you give a dollar a month, it's very helpful. Thanks for watching and as always I hope that you have a great day.