Let's take a look at this bash RC file concept, and see it's really about the fruit from the same tree. In this case the bash RC is the tree. And you notice that in this environment here AWS cloud shell, in this environment, get up code spaces in this environment as your cloud shell. Also google cloud shell every single one of them, uses the bash RC file, to configure the environment. And also, each of them has a little bit of a secret sauce, that does something special to that unique environment. So, we're going to primarily focus on this environment here. Was cloud shell, but I'll also show a little bit of get up code space is a little bit of Azure cloud Shell, and a little bit of google cloud shell, just to show you how once you understand the single bash RC file, you can really use it for everything. And also what's great to know about bashar see is that if you're using Os 10 as a laptop for example, you can also use those same techniques. Let's go and get started. Here, we are in the AWS cloud shell. It's in my AWS account and I went over to this icon here and I selected it and it opened up a new cloud shell. What's something that I would recommend doing when you first open any cloud shell environment is type in Echo, dollar sign shell like this. And this will tell us that we're using the bash shell and once we know that we're using the bash shell. I would type in ls dash l a tilde slash and this will let us see what's inside of ls dash l a tilde slash. And this will show us what's inside of the home directory. And you notice here that there's a bash history file, there's a bash log out and bash profile. These are all things that you could edit if you needed to, but most people will edit the bashar C because it's a centralized spot to store things that you're going to use in your interactive shell. Now, what I'll do here is actually open up using the vim file, that file and we'll type in bash RC and notice here we've got our ability to ed edit custom things. You can see the AWS itself, right here has a user local bin, AWS completar. They have all kinds of user specific aliases and functions here that they've created for us in the cloud channel environment. But we're going to actually going to customize us even further, and we're going to add in our own aliases. So let's do one here, which is, let's add in alias, and these are just shortcuts so we can type in alias, and we'll call this, how about source, code like that? It looks like a good alias, and then this will be anything that's in this source directory, this will actually get us right to there and if I type in cd into that. There we go, this looks like a great shortcut. So I'll go ahead and close that and now if I want to source it, all I need to do is open up a new tab here which will spawn a new interactive shell and we'll read that config file in there we go. And now if I type an alias notice that there's a new alias called source code right here and then if I just type in SRC code, it says that that directory doesn't exist, so if I do a command, it doesn't exist, I'm going to have to fix that. So all I have to do is just type in make tilda SRC. There we go. And now if I type in source code, there we go and we type in pwd, you can see that I'm automatically changing to that directory so you can see how this can be really handy to add aliases to your environment so that you don't have to type as much. Now, one other thing that's really important to call out here, is that it's very common to need to configure API keys. And this happens all the time when I'm working with students, or I'm working with my own projects. And so, what I'm going to do here is I'm going to create an empty file here called apikeys.sh. And so, what we can do is actually inside of this file, just edit it real quick, and just put a couple of just, pretend variable, someone type in export, secret one like this. And this will just be, 123. These are kind of pretend, api keys, and we can call this secret too, this could be anything from a slack bot api key to AWS api keys and we'll call this A B C. There you go. And then what we can do and if I wanted to, you know, just build this up with more and more stuff is every time I want to launch into this environment, what I could do is I could essentially put this path in this api keys file all within my my bashar, RC files so that it would always be loaded for any kind of work that I needed to do. So how would we do this up? Pretty simple, I would just go through here and and and basically create this path. So, we can actually test this out from the terminal, we could do this, we could type in exports. The path to api keys or something like this. And we could do this, we could just say home users and then we could type in api keys like that. That looks good. And then if I type in path two api keys, we could do that too. A P I let's say echo, path to ap I keys. There we go. And we see that that path has actually been been set up and and it's and it's good to go if I put a dollar sign there we go. So the dollar sign is the key here because the dollar sign allows us to actually echo out what that variable is. So we could do something very very similar inside of our bash RC files. So let's go ahead and do that. Let's go do go ahead and go vim tilde dot bash RC there we go. And then we'll add a variable here. So let's just add a let's add a path. Actually would be a good way to do it. And then we could add a new command which is source api keys pretty simple to do. We just type in the command source. And in fact we could even put a little command in here that says echo. I am sourcing this path and we could do this dollar sign. Space, dollar sign path to api keys. So this just gives us a little bit of context that we remember it. And then I just source it and I just source path dollar sign path to api key is dollar sign. We can just copy this to make it simpler. There we go, perfect. Now all I need to do is just reload this file. Although let's just be lazy and actually just open up a new tab. So that'll source it and there you go. it says I'm sourcing this path and now what does that mean exactly. Well, if we type in eco secret door sign, secret secret one, there we go. It's automatically in our environment so I can start using it. If I start writing python code or if I write a bash file that needs to actually use the api key. So this is a really clever way to actually inject secrets into your bash RC file. Now, let me show you one last trick here, which is what something I do a lot is if we want to use python, which is very common for data engineering. And I type in python python three dash M V N V tilde ve and be like this, this will actually create a virtual environment. Here we go identify source it, and and I and I put in this virtual environment notice it's the same style, right? I'm sourcing literally a shell script. In fact, for fun, let's actually look at that file, let's let's actually look and see what's inside of there. How you can see you can source other environments. Now, what this does is really is just remembering paths so that we can automatically load packages in python into a particular directory. So I'm going to go through here and I'm going to I'm going to put this command right here into my bash RC file. This is a neat little trick because now I don't have to source it every time I load my python environment. So let's go ahead and do that. Let's go to the gym again, go to bash RC file here, and we'll go to the very bottom of our file, and we'll go here and we'll say, sourcing python virtual environments. And we can do the same thing, we can add a little command here that says, I am sourcing a python virtual environment. There we go. And we we could add the path or whatever we wanted to but we're just going to keep it simple and just add that inside. There we go. And now what's great about this is again, I can be lazy and I can just basically close all the shells if I wanted to And just open up a new one and notice it says I'm sourcing those secrets. And I'm also sourcing my python virtual environments and look how do we know because it changed our shell prompt here, which is and this is the shell prompt. So what I can do to to verify this is type in which python. Great, now we've got python here. So In a Nutshell mastering Bash RC is a is a huge win for any data engineer and it's something that you can do really within 10 minutes. You just need to know a few things like aliases, you need to know variables and you need to know how to source things once you got that down, you're really good to go now. Let me wrap things up here by showing you other cloud environments. So I'm going to go here and look at google cloud and look at this. If we want to really verify what we're doing here, look the same thing eco shell, there we go. So we know everything we did is going to work the same in this google cloud shell environment. Now let's go over to get up code spaces, let's take a look at this and we'll also do the same thing. We'll type an eco dollar signs, shell bin bash, we know everything's going to work the same here. Likewise, we can go to Azure cloud Shell, we can also take a look, we can take an echo, dollar sign shell, the exact same thing. So really, even though these are vastly different environments that you have a common execution environment here with bash that really will let you easily run different commands and once you've got the hang of this really, it's a great way to feel very comfortable in a brand new environment.