 Welcome to Intro to Linux, where we're going to be covering some essentials in the operating system of Linux and how to get started. So assuming that you've never used Linux before, we're going to be starting there and really from the ground up, start to get some of those fundamentals down, some of the muscle memory that is required to learn and use Linux. So let's go ahead and do an overview of what we're going to be learning. We're going to start with an initial install. So assuming that you don't have Linux installed, we're going to start there. And we're going to be using these two tools here with the downloads linked, virtual box and vagrant. And this just allows for a faster setup and not as tedious as the other approach of using virtual machines. So from there, we're going to be covering some essential commands around the file system. So commands such as LS, CD, PWD and many more. But the idea is we're going to be learning how to navigate the file system, how to check what files we have, what our current state is in our file system. Since we're going to be doing this through the terminal and not the traditional point, click and drag way of doing things, right? So in this terminal only setup that we're going to be having Linux with, it's going to allow us to learn that way and really get those fundamentals down. From there, we're going to be covering some productivity tips. So how to get the most bang for your buck at the command line, things such as tab autocomplete where you can hit tab and it'll complete the rest of your command. And aliases, where we're going to detail on that, how that can save us time. From there, we're going to be learning these security concepts, such as permissions and access, why they're so important. And then pseudo versus super user, right, these two commands of pseudo and sue. Then we're going to finish off with man pages on how to get help on a command. So if we don't know how to use a command, or we've never heard of a certain command, we can use the man pages and get help on how to use them. We can also look for examples on specific use cases on how to use them. And that is going to allow us to get up and running when we're in unfamiliar territory. So this is where we're going to be covering in this course. If there's anything I've learned in my years working in information security and using Linux is that no one knows everything. But the best people know where to look, they know what questions to ask. And from there, they're up and running. And that's where we're going to be looking to do in this course when it comes to your journey in learning Linux. All right. So here we are in the virtual box installer. And again, I'm doing this on macOS Catalina. So click continue through this wizard, it takes you to the instructions on how to install virtual box. And depending on the OS, you might be able to do touch ID and type of Mac you are using if using Windows, you should just input your password or do the touch ID. And you can see it doesn't take very long to install virtual box. And you can do a spotlight search for virtual box. And you can see we have the virtual box manager here. So here we are at the terminal. What we're going to do here is initialize our vagrant box. So remember that was an operating system image, or to give it as a template. And then from there, we're going to create our config files, which is called the vagrant file. That allows us to make changes, any customizations that we would like. So what we're going to do here is vagrant in it. And then the name of the box, Ubuntu trustee 64. And if you've used git before, it's not a preregister for this course, but if you've used it before, you will recognize this right here, in it. So a little bit similar there in the nomenclature. So in this project directory, trustee, I just named it that to have it be more clear of what we're working on, and then do a vagrant in it that creates the initial vagrant file. And then from here, you have vagrant up, this will get your box going and import everything it needs for this base image. And you'll see a successful message once the, once the installation is done. And if you read some of this output, where you can see everything that is happening in the background, now we're going to face your adapters, port forwarding, only the correct ports needed for it, key based authentication, all of the things that you would kind of have to do manually. If you would do it in virtual box, downloading an ISO, waiting for that, then going into virtual box, getting your adapter set up. So you're saving quite a bit of time here. So you get quite a bit with vagrant, without having to go through all those steps yourself in a VMware or a virtual box in this case. And just to show that a little bit, let's go over here to our virtual box manager. And as you can see, trustee, the image, the vagrant image is running, but we're not using the virtual box manager for anything else other than the installation, right? We're not going to go into the GUI or mess with message settings or anything like that. As you can see, it's just the trustee default here, the trustee image, right? So the other way to install a VM would be manually, essentially, and looking at or messing with all the settings for virtual box, which we're not going to do. So you're going in here to network, this is where you put all your adapters, all your extensions. But with vagrant, we're not we're actually skipping all of that and just using the config file, the vagrant file. All right. So here we are. And after looking at that output, I would just went in and clear the screen. Let's do a vagrant minus H, which is the help message for vagrant command line tool. And then we could see what we have at our disposal. And we're going to use a couple of these. But you could see it gets pretty good help output for what the command does. And we'll use we use a couple of these. But first, the command that we're going to be using a lot is LS, right? We want to see what we have in our directory. And this one right here is the important one that we're going to take a look at, vagrant file. So let's go ahead and VIM VI into vagrant file, which is the configuration for our for our vagrant box, right? It has all the details that we saw earlier upon installation. And this looks a little bit intimidating. Don't worry. For now, we only have to worry about a couple of lines here. And most of this are actually comments, if you see everything with a with a pound sign. Those are comments, which reading through them gives us a pretty good idea of what's going on. So here's the first line that is that is actually running, right? It's not a common vagrant configure to config. And that basically executes our configuration. And the next one is down here, which is the name of our box, our vagrant box, the one that we installed with vagrant in it. And scrolling all the way to the bottom here, something's up with my cursor. There we go. You see a end keyword. So that's where the vagrant file ends. Now, going back up to the top, we're going to change one thing here. And it's going to be right here. And in order to edit things in VI in VIM, you press the I key, your keyboard, you see insert. That means you're about to edit or you can you can make a change. So what we're going to do here is just add a host name. We have our box name. Now we're going to add a host name. And we do that with config.vm.hostname. Let's go ahead and name this trustee, just like the name of the box, trustee01. In case we make more of these, remember, vagrant is a tool that allows us to quickly deploy VMs from one base image. So if we wanted to, we could create many of VMs from this base image. So we're just going to call it trustee01. And to exit, to save an exit that of VIM, press your escape key, colon WQ. So I'll say that once more, since VI does have a bit of a learning curve, escape colon WQ, which means write quit. So now those files, that file has been updated. And in order for those configurations to take place or to take effect, we're going to use one of these commands up here. And that's going to be vagrant reload here. As you could read here, it says restarts vagrant machine and loads the new vagrant file configuration. So this means that the changes will take effect. The changes that we just did in this VI command, we're going to be taking effect. And a fun fact is that vagrant reload actually combines a couple of commands. Combines vagrant halt and vagrant up. So a little bit of a shortcut workflow there, but let's go ahead and do that. Vagrant reload, and that'll make sure that those changes that we just made take effect. See the output here that is telling us what's going on behind the scenes. The network interface is the part forwarding. And in this case, the only change that's going to be different from the last time is the hostname. So you can see successful at setting the hostname. And now we have an updated config file, which for vagrant are called vagrant files. We're going to take a look at a couple of commands that are going to be pretty commonly used in the real world, but also in this course. And we're going to get to know them pretty well, as well as how to get the most out of Linux built-ins. There's a lot of ways to get help, a lot of ways to have a productivity boost just with using Linux built-ins and built-in features. So we're going to take a look at that. One command that we've ran already is LS, when you're listing your tractors and listing all your files. We're going to take a look at that. So now after that, we loaded our config and have freshly loaded config file. Let's go ahead and SSH back into a vagrant environment. I forgot to ran vagrant up and you actually combine these two. So this is one way, which we'll get into detail. One way to kind of boost your productivity is we're going to semi colon, which delimits or separates two commands, and it allows you to run one command run right after the other. So we're going to do a vagrant up to bring the machine up and then SSH right into it. So just give it a couple moments to go back into our vagrant environment, which we did make the changes in our vagrant file. So we'll have that new hostname. All right. So now that we're in our vagrant environment, we can even run a hostname and we could see that's the hostname that we changed in our previous video. So let's go ahead and look at some of these commands, right? Some of the things that we can do here, LS, which we've talked about, do LS, LAH, which list long format, all in H for human readable. And you can see the different files here, right? Anything with a D is a directory. Anything that doesn't have it is a file. So we have our files here in our home directory. And let's go ahead and CD into vagrant, which CD is another common command, which is change directory, changing it into a vagrant directory, which is our shared directory. So we can have files here in this folder in this directory, have them in our vagrant environment, but also locally, right? So in my case, a Mac, we could basically, as we mentioned previously, that's one way to have a shared directory where we don't have to copy files. You don't have to SAP or any of that. You could just have them make them once and have them there. Right. So these are our shared files currently. So one thing that that we could also do when it comes to productivity is tab, tab autocomplete, something that comes in pretty handy. So let's say you have a you have command, and it's a rather long command, maybe you're changing into, let's say, just as an example, CD Etsy, and you want to get into, let's say, log rotate D, just as an example, right? Well, you could type that out. But as you could see, there's another directory here that starts with log. So you wouldn't get that, or you would have to like remember exactly what to type, but you'd also do the log R and then tab and the rest of autocomplete, right? So it's just a way to, let's say you semi remember where you need to go, where you need to change directories to, and you have to remember just enough to be disambiguous and then Linux will take care of the rest. So that's one way to kind of boost your productivity as well. So these are these are a couple commands, right? LS, CD, hostname that we've ran, PWD, which is print working directory is another common one. And it's very useful because it lets you know what's the full path to, to where you are to your directory. And in case you don't, in case you need to navigate somewhere else, right? And you don't know exactly where your location is. So let's go ahead and CD and dash. That'll change you back into the directory where you previously were, right? So going back to your vagrant directory. That way you don't have to type this, or let's say you don't even remember where the previous directory you were in, you're working in, let's say you're working in this one for quite some time, and you just want to get back to your previous directory. This is a way to do it. And it's a pretty commonly used one as well. And it'll also save you some time. One of the other big ways that can, that can save you some time is using aliases. And the concept of aliases is base, basically, shorthand ways of running commands, right? Think of them as shortcuts, keyword shortcuts, which you can then use over and over. And that'll save you some time. Let's say you have a really long command or a multi command as we used previously with vagrant, vagrant up, vagrant SSH. You could wrap that into an alias, like a one word, one word alias, and run that. And then just, just call that every time you need to do that specific command. So that is, that's one thing you can do. And that'll save you some time. So let's go ahead and do an example of that. So let's take a look at an example here. Let's say you want a straightforward way to get back to this vagrant directory so that you don't have to CD and type that every time. So let's CD dot, dot, which means go up a level. So now we're at the root directory. And we can check that with PWD, which we learned earlier. And that tells us we are at the root directory at top level. So to go back to, to CD vagrant, right, we could do this CD dash. We could do CD vagrant, which more than likely we're going to have to do this, right? Unless we, we happen to, it happens to be that that was our previous directory. We're going to have to type it out. And let's pretend that this was two paths in or three, three levels in, right? We would want to continue to type that every time. So what we could do is set up an alias, right? A one word alias that allows us to execute that and get back to this directory. So the way we do that is with the alias keyword, and then we're just going to call it VG or vagrant. And wrap it in quotes, CD slash vagrant. So this is telling our shell that this keyword means CD slash vagrant. It's just as good as typing that out. So we execute that. And now let's test it out. Sure enough, we're in our vagrant directory. Now we can get one step fancier with this, right? We were previously at this, uh, directory. And let's say something like CD slash Etsy slash log rotate D and an LS just to show the concept that we can combine multiple commands in an alias. So let's say alias and we'll just call this one log R for log rotate. And we'll do CD and then this right here slash Etsy log rotate D. And then semi colon, which is going to separate these two commands command one and command two and LS LAH to get all the format and human readable. And that's going to be your alias for log R. And let's go ahead and test that out. Log R. Sure enough, we CD into this, this directory and we get an LS. So if it's something that you were checking often, right? So that you are going to have to type a lot. This would save you quite a bit of time by setting up that alias beforehand. One thing of note is if you want to make these permanent, right, regardless of how many times you log out of this session or let's say you reboot your computer, your host laptop computer, you're going to want to wait to for these alias to be permanent. And the way you do that is through your bash RC. Let's do an LS LAH, which is a command that we're becoming familiar with in this course. And we're going to do this till the sign, which till the just means home directory. So we want to look at our home directory here. LS LAH. And this right here, we see different files for bash history. But this is the one that we want here bash RC, as that's going to be where we can store aliases for permanent usage. So here we see our bash history, bash log out of bash RC. This is the one that we're interested in here. Now normally in a Mac, you could do this on bash profile, but for Linux, you're going to do it in this bash RC file. So what we're going to do just to reiterate, we're going to do is add these aliases, such as this one, such as the EG one for CD vagrant, we're going to add them in our bash RC so that they are permanent. And it doesn't matter how many times we kill the session or we log out, log back in, they're going to be, they're going to remain as our aliases and we could continue to use them. So I'm just going to go ahead and copy this before I head in here to the bash RC to vi.bash RC. Now there's a lot in here that is built in with our distribution and then with Linux. But down here, I just scrolled to the bottom. We have our, some of these aliases. So configuring for a grep output, LS output, basically color coded and some other ones for LS. What we need to know though, all we need to know though here is the concept that one keyword can allow us to do quite a bit, depending on how how custom we want to get with it. But the purposes of the aliases that we were demonstrating going to go ahead and add them down here. And I'm just going to put a comment in here for a grant and log rotate and gonna paste in my output didn't come here correctly. But I remember it, it was alias log R log R equals CD Etsy log rotate dot D. And I would recommend pasting this in here, but I'm typing this out for demonstration purposes. But here we have CD Etsy log rotate D and LS LAH, LAH. And gonna go ahead and check that just to make sure that I got that right down here. And sure enough, that's correct. Okay. So I'm going to go ahead and get rid of that and add the other alias, which was for vagrant. So alias VG. And that was CD slash vagrant. Okay. And to exit VI, it's escape colon WQ does take a couple of times couple of tries to remember that. And there's all kinds of jokes on on VI and how hard it is to exit. But just remember colon or escape colon WQ. And that stands for right quit. So now we have those aliases in our bash or C file. And it doesn't matter how many times we kill the session or log out, it's always going to be they're always going to remain since they're tied to our bash or C file. And we'll just go ahead and test that one out VG. And we're back at our vagrant file. So we could see how powerful aliases can be. They're pretty much up to our disposal, how much we want to customize, right? If we want to do three command aliases, four command aliases, right? It really just depends on how far we want to go. For example, at C log rotate, right? Let's just see what other directories are in here. Just for demonstration purposes. So there is no actually no mother directories in here. So I'll just demonstrate a two level, a two level switch or two level change and in directories. Let's say I want to go up two levels, right? What I could do is do an alias.to for two levels. And then CD something like that. If I was three levels in or three directories in, I could do it and name it three. But the point is, I can do some shorthand, right? Something that I'm going to remember. I want to go up two levels. And then I could just type that in. And now I'm there two levels up, right? So whatever works for you in the best way you're going to remember your, your commands and where you need to go, what you need to do. That's how I would recommend using aliases because it will boost your productivity and just save you a bit of time. The cool thing here is that vagrant allows for shared directories. Your vagrant box to locally to your Mac or Windows system or vice versa, you get a direct or shared directory for free. So let's just do an LS, LAH, which will show us in long format, human readable format, what we have. And what I'm looking for is the shared directory here. Since I happen to know that that's going to be in CD vagrant. Let's go CD to that change directory. And once again, as I said previously, LS is going to be command that we're going to be running quite a bit in this course. Because we want to list what we have in our directory that allows us to navigate from the command line, right? Versus searching in a GUI, clicking and dragging. This is a, this is the Linux way to do it. And it's actually more efficient. So what we see here is the vagrant file that we edited earlier. And just to just for visual representation, let's take a look. And although color waves are different, this is the same file that we edited previously. As you can see the only non comment lines are here. This first one and then these two, which we added the host name line. And then of course, go to have our end line or end keyword. And as you can see, we have this shared file text file, which I just happened to create for fun to show this concept of a shared directory. And there we have the shared file. And let's just do an MD five, MD five some, yeah, just MD five some on the shared file. What this does is output the hash of that file. So the hash representation of that file. And we're going to take a look locally on our Mac. And to see that it's the same file. So let's just do an exit, which will send us back to our Mac in the same directory. So you can see an LS, which we see the same files that we just saw up here. And we'll do an MD five for that same file. And you could see these two are the same hash, which means it's the same exact file. So this this ends up to be a pretty good workflow. If you want to share files from one to another from your Mac to your vagrant box or vice versa. And you don't have to mess around with with copying and pasting or SCP command. And then with virtual box, you would have to mess the settings in order to allow that sharing. So this just basically comes for free, which is a pretty, pretty cool thing from vagrant. And it's going to help in your workflow, we're going to go over some concepts and security, and some of the guard rules that Linux has built in, how we can leverage them, and how we can get to a level of understanding. So that as users and admins of Linux environment, we can become more self sufficient. Remember this course is all about how to get that initial level of understanding and how we can get going from there. So in a production environment, people wouldn't have the same level of access across the board, right, people work in the one department wouldn't have the same level of access as another. And that's what we have in Linux with file permissions. So, you know, if there's some sensitive files, only those that need to work on those will have access to them, and not everybody else. So having that same having that same concept, the principle of least privilege is what we're going to be discussing here, starting at a basic level. So when heading clear to my screen, and we're here in the route directory, and let's go ahead and go to our vagrant directory. So we could do the CD vagrant, or we could run the alias that we previously created. We'll go ahead and do that. Now we're at vagrant. And we're going to use another command that we've that we've become familiar with, with LS, LIH, just so we could see everything in long format, and look at the permissions. So you may have noticed this already, but we have our permissions here on the right hand side. Anything with a D is a directory. But then after that, is where we will go into the permissions. So what do these, what do these letters mean here? Well, R stands for read, W stands for write, and X stands for execute. So that means what kind of permission is given for these files, or for these directories, if it's in this case, right? But if you look at this vagrant file, for example, let's just try to break this down a little bit in what this means. So the R we've said means read and the W means write. We don't see any X's here. So that means there's no execution privileges for the given user. Now, if we break it down even further, we can think about these in in groups of three. So this is one set of three. This is another set of three. And this is the last set of three. And what this means is it's broken up in owner, group, and users. So this first set is the owner. That means the owner of this file of vagrant file has read write, but not execute. So they have read and write access. Then the group only has read access. The users also only have read access. So that kind of lets you know the permissions or the access that is provisioned for this file and set another way this this permissions here is 644. Now, how did I come to that to that number? Well, these these RWX are also represented by numbers, right? The binary representation of them. And there's resources for this such as Linux comm geeks for geeks, or you can just look at the Linux documentation as well. But one of the things that that we can remember that we can remember here is R is for represented by four, W is represented by two, and an X is represented by one. So we can even test this out here. Let's go ahead and create a file. And let we'll just call it permissions. So we're using touch to create this command to create this file. And let's look at its permissions that it's given by default. So it's similar to the vagrant file. We see that read write, and then only read for the last two, right only read for the group and the users. And this is where we can come start talking about another command that is pretty, pretty powerful, pretty common. And that's Tramot. That's going to allow us to modify permissions up or down if we need to. So we're going to take a look at the Tramot command here. And, and how it's useful for us as administrators of our environment, in this case, of our vagrant, just a vagrant environment that we're using here. So we see your permissions here with LS LAH, we have read write, read, and then only read. So set another way. There's this means that there's read and write access for the owner read access for the group and read access for all of the users. So we can think about these in terms of like three blocks, could say this is one block. This is second one. And this is the third one. So we think about it that way in terms of how they're they're broken up. And when it comes to Linux permissions, there's also the number representation or binary representation of these bits here of this RW. And if we scroll up here, we see an X, right? So read write execute. The only thing we need to know is the R is for or translates as for in binary or number representation of the permissions. W is two. And the X is one. So set another way this permission right here. This would be ours for W is two. So that would be a six. This would be a four. And this would be four. And since nothing else is on no other permission bits are on for this file. This could be we could say that this is 644. That's where Chimad comes into play, right? One way you can modify permissions up or down to give more access to give a less access is using the number representation. So if we do this, Chimad or change mod, how some people call it 644, and permissions.txt of the file, we should get this same exact output. This is just the number the number representation way of doing it. So let's go ahead do an LSLEH to check that. And we have the same output as we have here. Now if we wanted to change that, let's say we want to have executable permissions for our user for the owner as well, we can do something like this 744. So now we're adding executable bits. So the R is four, W is two, and the X is one. That would be 744. And let's go ahead and run that. And what we should see here is an X where this previous blank space was. So now we have executable permissions for this file as the owner and the text is green. So that's just Linux color output, the way it helps us know that it is an executable file. Now just for demonstration purposes, I'm going to change this back to its previous form of only read write. And we're going to change it. But now using the explicit annotation instead of the number number notation of changing permissions, we're going to change it in the other way. So let's go ahead and do that. And it's a little bit non intuitive with the nomenclature here as you actually stands for owner or your own user, right? So it's not but it's you. You stands for your own the owner or your own user. And what we want to do is read, write and execute how it was in this 744 output, read, write and execute. And then we'll give it the file name. So this should change it so that it matches this exact output of the Jamal 744. And let's go ahead and check that. And we see it's the same output as when we did it through the number representation. So whatever works for you in terms of how you out makes more sense for you, doing it this way, the explicit annotation or doing it the number, the number ways way, some resources to to get these permissions down in terms of, let's say you just forget what the numbers represent. I would recommend linuxsize.com, geeksforgeeks or linux.com. And those will give you a good idea of what these mean and kind of just instill those those fundamentals. We talked about permissions and what access that gives you to particular files and directories, but also at a user level, right? Not every user is going to have the same privileges out of the box. And this is where we're going to talk about the sudo versus su command. So sudo will allow you to run a command with super user privileges. And normally it's used to run that single command, right? And then you remain as your user level at your as your normal access. And the su command or SU will switch user, actually elevate you completely to that root or that super user. Now that would be necessary when you're going to be running a lot of admin level tasks or admin level commands, and you're going to remain as that user. But it's generally not recommended to do so when you're just going to run one or two commands as you're you're risking that user, that root level user, which has unlimited access. So so that's generally not recommended. So let's go over what these what these commands do in a couple of examples. So to demonstrate this example, we're going to look at a file that has or that is owned by root. Let's go ahead and do an L S L H at C hosts. And as you can see, this file is owned by root, which means only that sprees are just going to be able to write to it. So let's just go ahead and show this VI at C hosts. Now I'm still as my user, as my normal vagrant user. So let's see what we can do here. Just going to attempt to write something here. And as you can see, I get this warning down here, warning changing a read only file. And let's see if I can do something here. This is a comment for testing purposes. Let's go ahead and escape colon WQ to write quit or save the file. And sure enough, I get that read only option a set range. So it's not allowing me to do anything here because I am not the super user. I'm not root. So I'm going to go ahead and exit out of here the queue. And we could look at it and we could see those look at it again. We see those changes were not made. So now let's go ahead and run it with pseudo and forgetting the VI here. Let's go ahead and run that. Now we should be able to do it. So running I for insert and just going to put this is a comment for testing purposes colon WQ. And we'll go ahead and check it. And we did make those changes now that we are the super user. So that's definitely something that we that we see there as the we can see how this command could be could be beneficial for us. Now, the difference between running pseudo VI, right, and then doing something like this pseudo dash I. Now we are the root user, right. And we could see that with this pound sign. Just as a general rule of thumb that to remember by with anything you have a command prompt with the pound sign. You are root user. And when you see something like a dollar sign, you are at your user level. So let's say you can distinguish those two. Another way is with your UID. So your user ID. So if I run this command called ID, I'll get UID equals zero, which is root, right. That is the the highest level of access you have in Linux. And as we mentioned earlier, it's generally not recommended to use unless you need it. Following the principle of least privilege. And if we go back exit back as a vagrant user, let's go ahead and run ID there. We could see we are not UID zero, not the root user. We are vagrant user. So these are general concepts that we want to know from a security perspective when we are administering our environment. So the difference between running this up here pseudo VI and then your command versus doing this. Now you here you switched as your root user. And doing it another way would be pseudo dash su that pseudo su dash is what I meant. And that way, you're using the pseudo command to run a privileged command, but you're switching user. You're actually switching user to your root user. Now you are your root user. Just how we did it up here. But this is just another way using this su command switch user. We're in the ID and we see that we are the root user. Now we can go into this Etsy hosts without doing the pseudo and write to it. And let's just go ahead and do that for this demo. Another comment as root. And let's just go look at that and we could see that this was written. So that's the difference basically that you could run all commands without having to do pseudo because you're already super user. You're already that root user. So yeah, you're going to want to, you're going to do that when you're going to run up a lot of commands, admin commands, because it'll, it'll save you some time, but you don't want to do that as a general practice because, you know, it's just leaving your root user more exposed for potential attacks and things of that nature. So as a general security concept, you don't want to be the root user longer than you need to be. So basically, those are the differences between pseudo and super user. And anytime you have doubts on, on what a command does or wants more help on a command, we can use something very, very beneficial that we have built in here in Linux. And that's using the man pages. Now that we've gone over some commands that we can use, some examples on how to use them, and some security concepts, let's go over one last concept that will really help you in your journey of learning Linux. And that is how to get help on certain commands, right? How to learn how to use them and how we can even do this through our Linux terminal itself. So yes, we can research how to use these Google examples. And that's very helpful. But we also have a very powerful tool in our arsenal right here in our shell. And that's the man pages. So earlier when we were installing vagrant, right after we installed vagrant, we did a minus H, right to get help on on the utility vagrant. And we could do something very similar, but even more powerful when it comes to commands. And that's using the man pages. So we've used, for example, LS several times, right? But what if we didn't know how to use this command? How would we learn that right here in our terminal? Well, we can do something like man LS. What this is going to do is take us to the man page of the command. Go ahead and enter. And we could see it gives us a description on what the command does. It lists directory contents. So that gives us a pretty good idea of how we can use it. But it is more than that because it tells us all the options that we have a dash a dash B and so forth and explanations on what all these do. So we can start to read these and see what fits our use case, right? What do we want to do or have an output when it comes to the LS command. So far, just to look at some examples. So far, we've used the dash A. We've used the dash H as well, right here. So we could see what some of these other commands or some of these other options are as well, right? Which one of these do we might need to use, right? For example, we could see here the D list directory entries instead of contents. We could see down here, we have some pretty, pretty neat ones as far as fill with the comma separated list of entries. This one we know use a long listed format. And then down here, we could even reverse the order when we sort. We could sort by file size. So we could see we have a lot of options on how to use this command and just gives us a really good idea of how to use it, right? If we never use this command before, we could read these options and have a pretty clear idea on how to use it. Let's go ahead and look at another example, a command that we haven't used. We're going to do a man find. Now, the find command is a pretty powerful command that we can use. And let's go ahead and read what it's about. It tells us search for files in a directory hierarchy. Okay, so we have it gives an idea of what this command does, right? Searching for files in a directory. And here in the description itself, it tells us it searches the directory tree rooted at each given file. And it evaluates the given expression from left to right. If this sounds like a lot of jargon, right, we get a reread this and start to think about what it does. It searches directory tree. If we think of the directories and its structure as a tree, let's say we look at that Etsy log rotate D earlier, right? That's two directories in Etsy and log rotate. So that's the tree for that directory, that directory structure. And find can search that and search every file within that directory tree, given on the rules that we give it. So we can start to see or might be able to start imagining what it can do. Now, we could read all of this output, which I do recommend when you're first learning a command. But we could also do is use the search functionality of the man pages. And the way we search in man page is with slash. So we could do slash keyword, and it will take us to that specific keyword. So we could do, for example, slash dash L, and that'll take us to all occurrences of the dash L. But in this case, we want to look at examples on how to use the find command. So let's go ahead and do slash examples and hit enter. And we could see all occurrences of the word example are highlighted. But we could hit the N key in order to continue to scroll down and it'll take us to that specific keyword. We could just hit the N key. So let's just continue to hit the N key until we get to these examples. We see plenty of examples that are quite robust on how to use this command. Now, a lot of this is unfamiliar since we haven't learned it yet. But we could see that all of these have a description to go along with it. For example, this first one, maybe we don't recognize what the command does itself. But if we read the description, we'll get a pretty good idea of what it does. So it says find files named core, enter below the directory slash temp and delete them. And if we start to read this, we see find slash temp name core. So just like the description tells us, right, it's looking for files with a specific name. And it's using that with the option of dash name. And we could see if we continue to read, it gives us a little bit more details on what it does in terms of escaping specific characters. But we have a decent idea of what that command does. It's looking for files with that specific name, and then proceeding to delete them with this second half here. And if we scroll down a little bit more, right, we see other examples of the find command that could be pretty powerful. But we might recognize this part here, right? When we were talking about permissions in our security concepts, we could see that it's searching or we might be able to get an idea that it's searching for files with a specific permissions, permissions bit set. And let's go ahead and read the description for this one. Search for files which have reading right permissions for their owner and group, but which other users can read but not write to. And if we remember, the binary representation or the number of representations of permissions, right, read, write and execute all have a number allocated to them. So read is for right is to and executable is one. And just how the description tells us here, it has reading right for owner and group. So that's these first two. And that does check out as we can see, we have six for both of those. So that's reading right. And we have a four, which means read. And just how the description is telling us here, the users have read or read only permissions, right? So now we can understand that this command is searching for all files with that specific permissions set. And we can continue to read more examples down here and start testing these out ourselves. But we could see what this command, what this command does, right? And we could do all of this right here in the man page. Now, yes, we can Google and search for these commands, right? Search for examples of the fine command. And that's very helpful. But the concept explained here is that we can do a lot of this right here in the man page. And to really get the most out of the man page and its functionality, we can do a couple more things if we want to search for specific things, right? We talked about using slash keyword. But down here, we see this help message, press H for help. Let's go ahead and do that. And now we see a lot of different ways that we can leverage the man pages to search for specific things or to navigate around as well. So here we have under moving different ways to move around. And the keyboard shortcut, along with the explanation. So for example, this one, you can go forward, one line, this one go backward, one line. So that's a lot that we can use. Think about it as another tool in your toolbox when you're when you're using the man pages. And down here, we have searching. We use this functionality of slash and then the keyword pattern using the end key to continue to continue looking at the next one. But we have a lot of other options we hear that we have here, such as question mark pattern. So question mark, and then the keyword will search backward. Right? So we see a lot of different ways that we can use the man page. And man page has this own help, help messages that we can use in order to get the most out of it. So there's a lot that we can do here to to really leverage the man pages. Thank you for joining me in this course intro to Linux, where we covered an overview of how to get up and running in the operating system of Linux and how to use some commands. I really hope that you learned a ton and derived a lot of value, a lot of useful tidbits, and how to get started in Linux. Just as an overview, we covered an initial install on getting up and running with virtual box and vagrant. And why that was a more efficient setup than going another route. We covered some basic essential commands, such as LS, PWD, CD, and the concept of the man pages. We covered some productivity tips on how to save us save ourselves some time at the command line, how to be more efficient, such as have auto complete aliases, making those aliases permanent to survive reboots and so forth. Some important security concepts that we need to know, such as file permissions, access control, and pseudo and root privileges. And the concept of man pages, how to really leverage this tool that is a total game changer once you learn it. And it'll allow you to learn new commands on the fly. So I really hope that you learned a lot in this course and that you will continue on your journey in learning Linux. Thank you and see you in the next one.