 Today we're working with bash and looking at its history's option now as you probably know when you're writing stuff in the shells Issuing commands that are being saved to a file which you can then scroll through So I can hit the up arrow here a couple times and go through different Commands that previous type I can hit control R and search for one like so And I can also type in history and it gives me a full list of the history with numbers because you can jump to particular commands and history based on what number they are But we're gonna be looking at disabling the history temporarily in your session So let's say you're about to run some commands. Maybe it's a command that's going to have a password in it You don't want it saved to your history Well, we can disable that so just show you I'm gonna say echo one and echo two So now I can scroll up and you can see those are my last two commands using the up and down arrow keys And I can also say set plus oh, that's a lowercase. Oh history Now if I say echo three and echo four and I hit up arrow You'll notice that those last two commands are not stored in there and I can echo This is a test and when I hit up arrow You'll notice that's not there the last command in the history is disabled history and then to and that's just for this Session if I was to exit out of this and start a new session. Let's actually let's open up a new session here We'll say bash and I'll say echo So five echo six I can hit up arrow and those are there So going back up here If I wanted to re-enable history, I just say set Minus or dash lowercase. Oh history and now if I echo seven echo eight You can see that those are now in my history now again I'm working in the bash shell here my default shell my machine is usually Z shell and I have tried this command in Z shell and Z shell does not have this option at least not like this I've tried googling it and I have found some options that don't quite work like this If you're aware of one for Z shell, I didn't look that hard. I'm sure I could find it But if you're aware of a shell scripts or a command for the Z shell That is similar to this. Let me know in the comments below. I do. Thank you for watching again I hope you find this useful again if you're there sometimes maybe you're pulling a W get command and you need to put a username Password in there or using curl or something that you can run this command first And then after you issue it you can re-enable your history and you know that it isn't stored in that history there That's easier than going in and deleting it from your history file, which is in your home directory So I do thank you for watching. Please visit my website filmsbychrist.com. That's Chris the K There's a link in the description there You can support me in the support section using PayPal or through my patreon page patreon.com forward slash middle x 1000 I appreciate you watching. I appreciate your views your likes your shares your comments and as always I hope that you have a great day