What you'll learn
- Describe the hands-on, performance-based format of the RHCSA EX200 exam and why no internet access or documentation is allowed
- Set up a virtualization platform such as VMware, install Red Hat Enterprise Linux, and take a snapshot as a rescue point
- Explain how shells and virtual terminals work and use the who command to identify logged-in users and their tty sessions
- Use man pages to look up command syntax and distinguish section 1 user commands, section 5 file formats, and section 8 system commands
- Identify key directories in the Linux file system hierarchy standard, including the home directory and the variable data stored in /var
- Display the contents of a home directory with inode numbers by locating the correct ls option in its man page
Free 52-minute video lesson with a full transcript and knowledge checks. No account needed to watch.
Introduction
Here's what is covered in this skill!
Knowledge Check
What type of exam is the RHCSA?
Getting VMWare and Red Hat Enterprise Linux
In order to be able to build our lab environment we must first install virtualization software and obtain a valid copy of Red Hat Enterprise Linux. Let's walk through how to do that.
Note: Broadcom has recently updated the process for downloading and installing VMware software. To ensure the most accurate guidance, we’re utilizing a video from another course that reflects the updated procedure. The steps shown here still demonstrate the correct method for completing the installation.
Knowledge Check
In order to download RHEL for personal use you must pay for a license.
Installing RHEL
In this video we walk through the steps needed to build a RHEL virtual machine using VMWare.
Knowledge Check
What was the minimum recommended disk space for building the RHEL lab environment?
Understanding Shells and Terminals
The most well-known shell in the world of Linux is the Bash shell. But what is it used for and why is it so important? Let's find out!
Knowledge Check
What is the default shell on RHEL operating systems?
Getting Help
No matter how good you are, everyone gets stuck from time to time. The trick, though, is knowing how to get help when we don't know how to use a particular command. Let's explore how we can use the "man" pages and the "--help" option to do just that!
Knowledge Check
Which keystroke will allow you to search the content of a "man" page?
Exploring the File System
The Filesystem Hierarchy Standard (FHS) is a well-known convention in the world of Linux. By understanding how Linux operating systems are typically structured, you can confidently administer a whole variety of different Linux distributions. With that in mind, let's highlight some of the most important directories in the FHS and their contents.
Knowledge Check
Which directory in the Filesystem Hierarchy Standard houses system configuration files?
Validation
Let's validate what we've learned in this skill!
Check out the video solution below!
Knowledge Check
Is this your first time running RHEL?
This interactive assessment is available in the full learning experience.
View Transcript
Introduction
0:00Hey friends, and welcome to the Red Hat Certified System Administrator Course here on CBT Nuggets. So to get us going, the first thing that I want to do is just to talk to you about what you can expect to see on the exam. Basically, what are the exam objectives? What do we have to know? What are we going to learn in this course? And then what I want to do is to talk to you a little bit about the actual format of the exam. So with that said, let's just dive in and find out what this exam is all about.
0:30So the very first thing to know about the RHCSA exam is that this is a performance based examination. Quite simply, this is not a written exam, it's not going to be a multiple choice exam, anything like that. Instead, it's going to be you with a Red Hat Enterprise Linux operating system, completing a whole series of tasks. Now, one thing to note is that the skills tested in this exam are pretty much a foundation for system administration. So this would be considered more of an entry level examination.
1:01And as you can see here, by passing this exam, you become a Red Hat Certified System Administrator. Now let's just talk briefly about what you can expect to see within this examination. So the exam objectives specify we have to understand and use essential tools, that sounds pretty generic. What does that actually include? Well, it sets here things like creating and editing text files, creating hard and soft links, accessing systems via SSH, that type of thing. Now, one thing to say, if you don't actually know what any of this stuff is, do not worry, we are going to be covering all of this within this particular course.
1:35Similarly, if I scroll on down, we're going to learn how to create simple shell scripts, understand how operating systems actually work. So we'll talk about how we can boot, reboot, shut down systems, identify intensive processes and kill processes, that type of thing. And scrolling on down, we can see more and more of these objectives. Configure local storage, create and configure file systems, deploy, configure and maintain systems, as well as understanding basic networking concepts. So we'll also talk about what IPv4 is IPv6, how we can configure hostname resolution, what that actually means, what is its purpose, as well as discussing how we can create and manage users and groups in our system.
2:13And the last two things that we have to understand is how we can actually manage security on our system. We know in modern systems security is a very, very important subject. So it is no surprise here that we are going to have to understand how we can manage our system in a secure fashion. And the last objective is a more modern technology, and this is all around the concept of containerization. Once again, if you have no experience with containers, do not worry about it, we will definitely get to it within this course. Now, one last thing I just want to point out is that the actual format of the examination is that, like I say, it's going to be a hands-on practical exam where you're going to be asked to perform particular real world tasks.
2:53And because of this, the way this course is going to be formatted is we're really going to have a strong emphasis on validating what it is you know by asking you to perform particular real world tasks so that you're really getting the preparation needed for taking the real exam. Now, very, very important. It also specifies that in the examination you're not going to have internet access. So you can't go and use the big Google machine to search for answers or to help you troubleshoot problems, nor will you be able to bring in any type of documentation. So no hard copy or electronic documentation is allowed at all.
3:27So no notes, no documents, that type of thing. But as you're going to learn within this course, there are actually things within the operating system itself that you can use within the examination to help you out when you get stuck. Okie dokes, so that is what you can expect from the examination as well as the content within this course. The next thing we're going to be talking about is how we can set up our lab environment to begin testing our skills. And well, that's what we're talking about in the very next video.
Getting VMWare and Red Hat Enterprise Linux
0:00Alright friends so what we're going to do in this particular video is we're going to go and get some virtualization software so that we can well so we can virtualize our operating system. Now just to be clear here there are different solutions that you can use for this virtualization. For example one tool you can use is something known as virtual box. Another option is something known as UTM and there are a few others but the one that I'm going to be using is this one right here VMware. Now there isn't anything special about VMware you can choose any which one you so wish depending on your platform. VMware just happens to be my own personal platform so this is the one I'm going to walk through the basic installation of. So once we have that up and running then we'll go and get the operating system that we're going to be using for Ans ible okay so let's go and download VMware first then. So let's go to a browser here and all I'm going to do is set for VMware download okay so it should take you to this website right here okay.
0:54Alright so just to be clear here VMware has actually been bought by Broadcom and since this has happened well some people who complain that downloading VMware can be a little bit cumbersome and I wouldn't necessarily disagree with that but nevertheless what I'm going to do is I'm going to walk you through how you can effectively still get VMware okay or at least this will be the process when I'm recording I can't guarantee that in a year's time that it's going to be different but fingers crossed that it's going to be okay. Alright so what I'm going to do is go to the download now button right here so let's just click here as so and what it's going to do it's going to take me to the Broadcom website so this is the redirection I was talking about so just give this a moment and what we can see here is where we have a login page okay so let's just zoom in a little touch.
1:37Now first thing is first if you have a Broadcom account you can just go and log in if you do not have an account we're going to have to go and create one so if you just go and search for create Broadcom account what we can do is just go to this link here to register and pretty much all we're going to do here is to walk through a simple registration process so pretty much typing your email address and we're going to have to enter in the capture form right here and all I've done now is they've sent me a verification email. Alright so all I 've done is went to my email account I'm going to paste in the numbers that they sent me here okay so let's just go and verify and what I'm going to have to do now is to fill in some registration details sort of type in my name select my country you can go and select a job title then type in a password and just accept the conditions here and then we can create the account. Alright so we have successfully registered and for now what I'll do is just say I'll do it later so in this stage here if we go back here let me type in my email account now it says here that permission has been denied this is part of the annoying stage since the Broadcom acquisition so what we're going to have to do is we're going to have to unlock the account so you'll notice here that upon first login you'll see a message saying your account is locked to unlock the account follow all of this stuff you're documenting okay so let's click this here and what we can actually see here is the resolution that we have to go through okay we're just doing a lot of bits so you're going
2:54to have to go to the support portal and then click login in the upper right corner so let's go up here login type in the password alrighty oh so after all that nonsense it appears that we have logged in okay so what I'm going to do now is go to my downloads and what we're going to see here is no data is found but we have this option here for free software downloads available here okay so what I 'm going to do here is choose this here click this now at this stage here I should be able to go and search for vm where okay so let's just show results now here is the software right here okay so depending on what you happen to be using the i.e the computer you have the software that you want is going to be a little bit different because it happened to be in a Mac I want to download vmware fusion which is their Mac book implementation okay whereas if you happen to have a Windows machine or a Linux machine you can choose vmware workstation pro okay so depending on which one you have choose the correct one okay so I'm going to go to vmware fusion now this stage here the version as I record this is going to be vmware fusion 13 let's click this right here and I'll just choose the latest release okay so let's click this if I try to download this again we're going to have a little bit of an issue look at this can't do it can't do what's going on well first thing we're going to have to do is to agree to the terms and conditions now what you'll notice is is if you try to click this seems like you can't click it you have to make sure you click this link right
4:12here terms and conditions now you you should redraw this okay so we're going to go and redraw this of course and once you've done that now that you've clicked this now you can actually tick this box but make sure you actually click this link first okay now at this stage here we can go and choose to download but again you're going to see something else it's leaning as required more hoops to jump through so fun fun let's just download this and it says you're prior to downloading this additional verification is required to let's proceed okay so what i'm going to have to do here is to type in information related to who i am pretty much my name my address my postcode all of that stuff and then once i've done that i'm going to choose submit so i'm going to go through this i'll blossom it out and then once i'm done i will go and submit this okay all right so with that now done what i will do is choose submit okay so here we go now what i should be able to do is to go and download this or click here the download should begin let's just save this as so and hey we 're now beginning to get VMware downloaded okay so i know it's quite a bit of well it's quite difficult to be honest but hopefully at home you weren't able to get this up and running assuming that they haven't changed anything of course and they'll now have access to this really good virtual ization software all right so now the downloads should be complete let's go up here and let me just click this i'm going to do to double click to install fusion and i'll choose to open it type in my
5:29password to confirm so now we have VMware up and running what we're going to do now is to get a copy of Retat Enterprise Linux
Installing RHEL
0:00So let's now walk through the installation of Red Hat Enterprise Linux on our VMware player. So I will go up to file and create a new file, now, right now here it says select the installation method. What I'm going to do is I'm going to install a disc from an image. I will just click continue here. Now once again, if your interface looks a little bit different from mine, don't worry about it too much. Since I have already used Red Hat Enterprise Linnux on this machine before I can already see it here. But if I don't, I will choose use another disk or disk image and from within the download I will just select in my case here, the Arch 64.
0:35Of course, if you downloaded the x86 version, you would choose that, whatever it may be. So now I have this image right here, my Arch 64 and I will choose continue. So right now it gives me a summary of my automatic settings. By default, I'm getting two gig of ram. This is the memory and I've also got 20 gig of hard disk space. And these really are the minimum requirements that you're going to have to need. Two gig ram, 20 gig storage. Now if you happen to have more space that you can spare and more memory available to you, then by all means you can extend these configurations.
1:09But if you don't, well these settings should be enough. Now if you happen to be on a Windows machine, the output here will look a little bit different, but in my case here on a Mac, you can just choose customized settings or just give us a name of Relto, save here. And in the Mac I can go into processes and memory and I can crank up my memory settings. Let's give it maybe say four gig or so. Go to show all, go into the hard desk and if I want to create more space, say for example like 40 gig, then I can just do so via the slider and choose apply. Once again, the Windows interface will be slightly different, but the core principles remain the same.
1:44You can easily modify your RAM that you want to allocate to your machine as well as the available disc space. So if I just choose apply, what I'm now going to do is to press this big button to start up my machine. So let's do that. So right now we have the option to test this media. I'm going to recommend we don't do that and arrow up to the top just to simply install Red Hat Enterprise Linux. So if I just hit return here and just give this a moment. Great, so we've came to this first page and this page is going to allow me to specify the language that I want to use during the installation process.
2:15Now I am speaking English in the United Kingdom. So that is what I'm going to select. If you so wish, you can just toggle through all of these options and choose the one that best suits you. So English UK for me, and then I will click continue. Now here is the thing, we have some options in terms of localization. We can specify the actual keyboard here. Once again, I am English uk. If you want to change this, you can press the plus sign and specify a different option. Perhaps you're in the USA, for example, but right now this is all good for me. So I will just choose done.
2:45The next thing I will do is choose my time and dates. Once again, I am in the UK, so I will just make sure I'm choosing the London region or rather the European region with the city of London. If you want to choose something else, and of course you can go to the dropdown, choose wherever you are, whether it's Africa, Asia, Australia, whatever it may be, and then you can select your own city. Right now, like I say, London is good for me, so I will just choose done. The next thing I'm going to choose is the installation destination. So right now what I'm going to do is I'm going to make sure that my desk here is ticked.
3:17Notice the size in my case is 40 gig because I extended the size from 20 to 40. If you left at the default, you can expect to see 20. My storage configuration, I'm going to leave at automatic and I'm not going to bother worrying about encryption. So right now that is all good, so I will click done. The next thing I'm going to do is I'm going to select the network and host name. All I'm going to make sure is that this part here is toggled on as so, and it's connected right now we can see I'm getting an IP address. So with that I will now say done.
3:48My software selection, all I'm going to specify that is that I want the server with the graphical user interface, this should be the default. So if that is the case, just leave it so. And I'm not going to worry about any of these other particular utilities, right just now. So with that, let's just choose done. The root password, what I will do here is I will create a root password. This is going to act as the administrator password. So I'll type in a password here and I will just confirm it and I'm not going to tick locking the root account or allowing root SSH login with password. I will just say done.
4:19And now I will go to user creation. This is going to be the actual user of the user account that I will use when accessing the system. So right now I will just use my username of ipvzero and bad security. I will just give this the same password that I gave for the root accounts. Once again, this is something you should not do in a real production network, but because it's just a little lab environment and a virtual machine, then I'm being a little bit relaxed on security and I'm also going to specify that this user is an administrator. This means that I'll be able to use this account to actually act as the admin in particular circumstances.
4:54So with that said, let's now click done and we should be pretty much good to go. So let's now click begin installation. So if you just give this some time, depending on your system, it may take longer, it may take shorter, but in my case here, I'm going to grab a coffee, pause the video and I will see you when this is up and done. Okay, so now the installation is complete. I will just choose reboot the system and the reboot will begin. So here we are. I will just click on my username here and type in the password I created and bam, there we go. So if you so wish you can take the tour, but right now I'm just going to say no thanks.
5:27Now what it says here is that the system is not registered. You're going to have to register the system to actually receive software updates. We'll handle this in a moment. The first thing I want to do is I want to go up to activities here, and then I will go down to this option here, terminal. This is what we want to get. So let's click this here and I will just expand this a moment. So you'll notice that the text is super tiny. We're going to modify this. If you go to this option right here and get down to preferences, what I'm going to do is I'm going to go down to my profiles.
5:58Now the profile that I have is unnamed. So the first thing I'm going to do is I'm going to select custom font. So I'll just tick this and all I will do is go over here and I can change the size by pressing the plus arrow. So always make this nice and big for you. Right here I will choose select, I will disable the terminal bell. If you want to change the colors on the actual screen, then you can untick use the colors from the system theme, which you can see here changes things. If you want to choose, say for example, green on black, so you look like a hacker or you want to choose black on white, whatever it may be, you have a whole bunch of options.
6:32So at this point what I'm going to do is I'm going to register my system right here with Red Hat Enterprise Linux. So the command that I'm going to type is going to be subscription manager, and that is subscription-manager, by the way. And then I will just type register. If I enter here, it's going to ask me for my administrative password. So just type in that admin password. And now I'm going to have to specify what my username is. This is going to be my Red Hat login information. So I will just give my Red Hat email address right here.
7:03And now I will specify the password that is associated with that Red Hat account. And then I enter, just give it a moment to register on the system. It's going to check the status, and now it says that the system has been registered with a particular ID. Now the next thing I'm going to do is I'm going to say subscription-manager once again. And then I will say attach. If I hit enter, once again, I will give my root password and hit enter, give it a moment. And now we can see here the system has been registered and software updates have been enabled.
7:34Perfect, so if I just clear the screen and now I will go to my power button and I'm just going to choose Power Off. Okay, I will then choose again, power off, give it a moment, and now the machine has shut down. So if I go back to my actual VMware library. Here, I have my virtual machine right here. What I want to do is I want to save this configuration. Like I say, this is going to give us a snapshot. So if I ever happen to make a mistake, what I can do is just tell the machine to go back to this current state where everything has been set up.
8:05It's nice and clean, nice and lightweight. This will give us a nice safe rescue point. So if I just highlight that machine, I'm going to go to virtual machine here, go down to Snapshots, and I will just choose, take snapshot. And that means that if I go into this machine and look at the snapshots, we can actually see I have a snapshot saved at the current time right now. So now that we have our system up and running, what we want to do is to begin to understand some of the basics behind shells, terminal and the general syntax we use on the command line when interacting with Red Hat Enterprise Linux.
Understanding Shells and Terminals
0:00So now that we have our system up and running, let's now talk about shells and terminals. So let me just go up to activities here. Down the bottom right, as we can see, we can have a terminal. This is exactly what we want to talk about, so let's just click this. Okay, so the very first concept that I want to talk to you about is something known as a shell. What on Earth is this? Well, right now, as we know, we have this Red Hat Enterprise Linux installation and here we are as a user, as you can see, we're looking quite happy (chuckles) and I know what you're thinking, how amazing are my artistic skills, but realistically, that is about as good as I can do unfortunately.
0:38So here we are, here is our RHEL operating system, we want a way to interact with this operating system and this is exactly what a shell actually gives us. It gives us as the user a way to talk to the OS. Now with respect to Linux, there are many different types of shell environments. You can use something known as a Zsh shell, as well as a regular Bourne shell as it's known, but the shell that we are going to focus in on happens to be, well, an extension of the Bourne shell. It's known as the Bourne Again shell.
1:10I know what you're thinking. It's kind of like these Jason Bourne films whereby you have the first one and then you have the sequel. And quite often in movies, the sequel does not live up to the standards of the original, but that is not the case here. In the Bourne Again shell, the re-imagination of the older Bourne shell, it really is a much better shell to work with. Now in the case of Red Hat Enterprise Linux, the default shell happens to be the Bourne Again shell, which is more commonly known as a Bash shell, hence the name Bourne Again shell.
1:41So this one here, the default is the one that we are really going to be focused in on. Now, the good thing with Bash is that we get a lot of good features such as auto completion when we're typing out particular commands or specifying particular paths. As you're going to learn, this makes our lives much, much easier but we're also going to have to be aware that Bash is case sensitive, meaning that if you type a command and you happen to specify a capital letter where a capital letter should not be, then that command is not going to work. So just bear that in mind and be careful.
2:13So we have this shell right here, like I say, it's a way for us to talk to the system, but the way we're going to access the shell environment is via a terminal, which is exactly what I'm using right here. Now the cool thing is that with respect to these graphical installations, this little application time running right now is actually what is known as a virtual terminal, and one of the cool features about having this virtual terminal is that we can actually have access to multiple windows at the same time, having multiple different shelf sessions on the go.
2:45So check this right here. If I just type out a general command such as ls, here we can see the outputs. However, if I go and click this little plus icon right here, I also get a second tab, so we can click the left one to get back to the original environment, but then I can click back over and then type in a new command and do different tasks if I so wish. This is one of the big advantages of having this graphical environment and these virtual terminals to give us access to our shell environment. Now, what I first want to do is to show you a command known as the who command.
3:18Let's just type this out here, okay? So if I say who and hit Enter, basically what this command is showing me is who is logged in to the system. So on the very left hand side, we can see the actual username, which is my username right here, we can see this option for tty2. Now, very generally speaking, tty just tells us about the terminal that is in operation, right now we have tty2, but say, for example, I went into a text-based environment that did not have the graphical use interface and tried to log into the system once again, we could actually spawn up another terminal session.
3:51This could be, say for example, tty3, and like I say, this information will be reflected via the who command, the user that is logged in, their terminal session, as well as time and date information about when that session was started. Now say, for example, I wanted to change my virtual terminal, what I could do is use the command chvt and then give an associated number for that terminal. So if I just happen to say, let's go with chvt and call it tty4, one thing to note here is that if I try to run this command, we're actually going to get an error and that is because I'm going to have to have superuser privileges right here.
4:28Basically, this has to be performed by the administrator, and I will talk about superusers and elevated privileges in a lot more detail throughout this course but for now, the command that we can use to invoke that superuser privilege is the command sudo. This is a super well-known command and it's something you're going to see all over the place. So if I just say sudo chvt and then give that terminal number that I want to spawn, if I hit Enter, it's going to ask me for my password for superuser privileges, I will type that in and bam, it snap me into this text-based environment, no longer are we in this graphical environment.
5:04So if I just log in with my username ipvzero, type in my password once again, we can see the last login from my previous session was on tty2 at 17:11. If I now say who, we can indeed see that I now have a session ipvzero for tty4. And once again, if I want to change back, I can just say sudo chvt and go back to terminal number 2 again, type in my password for the superuser, hit Enter, and now we flash back into the current session once again. So now we understand the concept of shells and terminals but that doesn't really help us navigate the command line and work with these shells.
5:42How on Earth are we going to do that? Well, that's what we're gonna be talking about in the very next video.
Getting Help
0:00So, let's now look at a few commands that we can use to help us navigate our bash shell. So, the first command I want to talk to you about is the man command, and what this command is going to do, it's going to allow us to access the manual pages for a whole host of other commands on the system. So really, really helpful. So, the syntax in order to utilize this command is to specify the command "man" and then target the particular page that you want. Let me show you what I mean. So, take for example the ls command, okay?
0:31If I want to see more details around this particular command, I can just say man ls, and check this out. At the very top, we see the name, which is in bold text, and then we see the command followed by a very short little description. Now, the synopsis here actually tells us how we can utilize this particular command. So, what we have here is the concept of an option that we can give to our command, as well as what we're looking at here is an argument. Now, if we go to the description section here, we get a short little description about what this particular utility is going to do, similar to what we see here, but we get a little bit more detail, and now we can see all of these switches or options if you prefer.
1:13Now, notice the syntax. We tend to have a hyphen followed by a particular option. In this case here, -a. But adjacent to it, we can also see we have this --all. Pretty much what this is telling us is that we can get the same effect in either way. We can say -a or we can also say --all, and that effect is going to be, we are not going to ignore entries that start with a dot. Basically, directories and files that begin with a dot are hidden directories, so these are going to show those hidden directories as well as the regular listing within.
1:46So, these are all of the options we can use. We can do -a, we can do -A. Remember, what did we say about bash? Bash is case sensitive. So, if you change the case, you can get a different effect entirely. Once again, we have other options like --author, -b, so on and so forth. Now, with respect to this part here, the arguments, this would be the information that you would supply to the command. Let me show you what I mean. So, if I want to exit out of the man page, I can press the letter Q to quit, and now I'm back.
2:16As we can see, I can run the ls command and that returns the directory listing. However, if I want to add an option or a switch, I can do one of those, say for example, -a, like so, and hit Enter, and now we're seeing these hidden directories such as .mozilla or .local, that type of thing. And if I want to target a particular directory, I could feed that in as an argument to this command. So, I could say ls and then maybe target the pictures directory. If I enter, we get a listing, but as it transpires, nothing is inside of that directory.
2:49But if I tried another directory such as ls and tried the /var directory and hit Enter, as we can see, we can feed in the var argument to the ls command. And if for whatever reason we wanted to add an option to modify the behavior, we could do -a, and now we can also see some hidden file. So, as we can see here, just by utilizing the man page and targeting a particular command, we can see all of the options available for that command and how we can actually use that command, as well as having a description about what that command is able to do on the system.
3:23So once again, if we just go back into the man page for ls, if you use your down arrow, you can just scroll through all of this, but what happens is often these man pages are very, very verbose, so if you want to scroll through things a little bit faster, you can use the space bar to page through these pages one at a time. We also get information such as exit status. We'll talk about these later on within this course. We also get information relating to the author of this particular binary, as well as documentation information, say for example. So a whole bunch of info right here.
3:55Let's go up to the very top again. If I want to, perhaps, look for a particular piece of information within this documentation, this manual page, what I can do is press the / whilst I'm in the manual page. Look at the bottom left, I press /, and this is going to allow me to invoke a search. So, let's maybe say I want to find out how I can do a long listing. If I just type the letters L-O-N-G and hit Enter, automatically, it's going to begin searching right here to find that word within the document. Now, right now, the first hit is not actually telling me what I want to find, but if I press the letter N, that now snaps me to the next one that's found as well as the next.
4:35I can just keep pressing N and now we go to the next. Look at this at the very bottom here. l use a long listing format. This sounds like what I actually want. So, if I press Q to quit, I can do ls and do -l to get a long listing, and now we've modified the behavior. Once again, if I want to target a particular directory, well, I could pass that directory in as an argument using the -l option to modify the behavior, and now look at this. So, really very important. Try to remember that when you happen to be stuck or you happen to forget, as we all do, a particular command, or how to use a particular command, one of the best ways to save you is to use the man page.
5:13Now again, if we do man ls, for example, I want to draw your attention to this part here. See, in this bracket we see the number one. Now, what is happening here is that the manual page happens to utilize different sections. Now, the range you can expect to see is section one all the way to section nine, and really for our purposes, the sections that we would be interested in would be sections one, five, and eight. Now, when we happen to see a man page designated as section one, these are for user commands.
5:45So, right now we can see ls, this is the manual page, and it's a user command. So I, as the user ipvzero, should be able to actually run this ls command. Now, section five relates to file formats. We'll talk about that a little bit later. But the next one I want to focus in on is section eight. Section eight relates to not user commands, but rather system commands. Basically, if it is denoted as section eight, this is really going to be for the root user. So, let me give you an example of what I mean here.
6:16Now, if I go into the man page for visudo, as we can see here, we get a very similar outlook. We get a name, tells us the name of the command, we have a short little summary, we get a full description telling us this edits the sudoers file in a safe fashion. Again, don't worry about what that is, we'll talk about that later. And we get a synopsis of how to actually use this particular command. So, if I press space bar, we can see all of the different options, so on and so forth, but the interesting part is if we go up to the very top, we actually see this as denoted in section eight.
6:46So, section eight is telling us this relating to system administration commands. So very often, although not always, when you happen to see this, you can generally expect to use the sudo command in conjunction with whatever command you happen to be reading about. So, let's test this out. Visudo is section eight. Let's press Q to quit. If I just run the command itself, visudo, and hit Enter, tells me permission denied. However, if I say sudo visudo and hit Enter, I will type in my admin passport and hit Enter, now suddenly I get access.
7:19Now, another good option aside from the man command is also to use the --help option. And notice I have the double hyphens right here. That is exactly how we're going to use this command. If I wanted to see the help page for the ls command, for example, I can say ls--help and hit Enter. If we scroll on up, very often as in this case here, we're going to see very similar information between the help page and the manual page for the same command, but very often, typically the help command tends to be a little bit shorter, a little bit more truncated, whereas the manual pages very often are really quite verbose and comprehensive.
7:54Now, another place that we can go to find information relating to our system is in the usr/share/doc directory. Now, what you find in here tends to be a bit more involved. It's not really where you're going to find information relating to particular commands, but rather for particular services on your system. So, say for example you want to find information relating to some logging service on your system. Very often you can find information and sample files within this particular directory, but generally speaking, the command that you will rely on most, and the command that I use almost every time I'm on a Linux system, is indeed that man command.
8:30So, definitely get used to using it. It really will help you.
Exploring the File System
0:00So now that we have an understanding about Linux shells and terminals, as well as how we can retrieve information relating to particular commands, let's now talk about the file system hierarchy standard within Linux. So when it comes to the file system hierarchy standard within Linux, what we are talking about is the general way in which Linux file systems tend to be structured. Now, I use the word tend deliberately because this is not a mandatory implementation. That is every Linux distribution does not necessarily follow this particular convention, but it is indeed a strong convention.
0:36So whilst we might see slight variations across different distributions, the general structure, the general layouts is going to be very, very familiar independent of the distribution that you happen to be using. Once again though, with some small variations. Now let's just discuss how the file system is actually presented to you as the user. So here is the thing. Perhaps you are familiar with Windows based operating systems. Now suppose you went into a particular folder or directory that was known as the Downloads folder, okay?
1:09If you happen to access this on the command line, you could do this by specifying the full path. Now, the full path might look something like say the C Drive and then perhaps maybe a directory called users and a directory for say for example, John, which is my name. And then within John's directory there you can find the Downloads folder. So the thing to note is that this particular folder is explicitly tied in name to this particular physical disc, the C drive. Similarly, maybe you would go into another directory and perhaps that was part of the D drive, and then you would have another path entirely yet again.
1:47Let's maybe say it was a pictures folder, who knows? Now the thing to note here is that with respect to Linux, when we happen to be moving through directories on the actual terminal right here, the actual discs that you happen to be accessing under the hood are completely transparent to you. Now to be clear, there are ways in which we can find out this information and correlate this particular file path to a particular disc. But generally, just as you are regularly using the command line, this really is quite seamless.
2:17So what I mean is that feasibly you could go into the Downloads directory and be on one disc and then perhaps change into another directory, such as the pictures directory right here, and suddenly you're reading data from an entirely different disc. Now as it transpires in my case right here, both of these are all mounted at the same point. So we're not actually switching discs right just now, but I'm just letting you know that theoretically if say for example, this directory here happened to be mounted on a different disc entirely, then this output would still look the exact same.
2:48The change of location would not be noticeable to you as you go about your day-to-day business. Now with that said, let's talk about some of the directories that we can expect to see within this file system hierarchy standard. So the very first concept I want to discuss with you is the concept of roots. Now, what I drew here happened to be a forward slash. This is very, very important, because a forward slash on its own actually denotes the root of the entire file system. That is, this would be the parent directory under which everything else comes under.
3:20Now, as you're going to see, when we look at this file system, it's super important not to confuse the root directory with the actual root of the file system. Let me show you what I mean. So right now I'm going to change into my directories by saying the command CD and the directory in which I want to go to is going to be the root directory, which is this forward slash. If I now hit enter, we switch to the route directory, and if I do a listing of that directory here, we can see here a whole bunch of different directories. Now we will certainly see some of these directories in much more detail as we progress, but let me just give you a high level overview of some of the more important ones right now.
3:59Now the first thing to say for a good help if you happen to be confused, a good resource once again is by utilizing the man page. So if I take the command man and then say, hier for hierarchy, and to enter this actually gives us a description of the file system hierarchy. Now you'll notice here it says a typical Linux system, so not everyone is going to have this. And if you continue to press space bar, you can scroll through more and more of these directories if you so wish. But once again, the information here as presented in the man pages, it really is quite verbose.
4:31Let me just tell you about some of the more common ones that I would like to focus in on. So once again, we'll press Q to quit. So I'll do a listing once again. Let's first start with say the BIN directory. So the bin directory, as the name might suggest, is all about binary files. Basically, these are executable programs that your system can utilize. So if we do CD and go into the bin directory, let's do a listing in here. You may notice if you scroll through the outputs, you can see things like the LS command or perhaps maybe the CD command.
5:01These are actual Linux commands that your system can use, and this is where these binary executables happen to reside. So once again, I go back to the root file system. Let's do a listing. Let's now take a look at the boot directory. Once again, the name itself happens to be pretty descriptive. This is where you can find files that are used for the booting of the system. So go into CD boots, do a listing. Like I say, what we have here are a whole bunch of files relating to our booting. So things like the initramfs image once again, something we'll talk about later on within this course.
5:34Let's go back to the root to do a listing once again. Next we have our dev directory, which we can see right here. And the dev directory is where we can locate particular device files that are going to be used by the operating system so that it can talk to specific hardware, i.e devices like, oh, I don't know, like a USB drive perhaps, or an external hard drive connected to the system. If we plug in that USB, then our system will use the files within this directory here in order to facilitate that communication.
6:04Next, we have the ETC directory, otherwise known as the Etsy directory. And what this actually houses is system configuration files. So say for example, I go into the Etsy directory, let's do a listing. I have a directory for Firefox, which happens to be the browser installed on this graphical desktop environment. Inside of this directory is going to have particular configuration files relating to that browser. This is a system way configuration that would affect not just the IPV zero user, but also any other users on the system too.
6:38Once again, let's do a listing. Here is our home directory, and once again, this is an appropriately named directory because this is somewhere we can keep our personal files. It literally is our little home, so to speak. So maybe you want to write your own little programming scripts, or perhaps it's where you want to keep your documents, or your own pictures, or perhaps your downloads. This really is somewhere for your own personal files. Now, like I say, this acts as a personal directory for you as the user. And what actually happens is that for all the users on the system within this home directory, they will have their own directory within here.
7:14Now, typically that directory is going to be the name of their username. So right now, if I go into this home directory right here, if I do a listing, the only user we have on the system happens to be ipvzero. So ipvzero actually has a directory here. And if we go into that directory and we do a listing, we can see we have a folder for documents, a folder for downloads, a folder for pictures, so on so forth, a personal place for that particular user. So we go back to the directory. Let's clear the screen, do a listing. Here we can see the Lib directory as well as Lib64.
7:46Inside of Lib are basically a bunch of libraries, hence the name. And these are libraries that the system happens to need to operate. So say for example, the binaries found in bin, they can utilize the libraries found in lib. Next, we go into the media directory. Say for example, you want to plug in a USB drive, or some other type of removable media. This particular directory here is where you've been mounting this USB to make it accessible. Similarly, we also have the MNT directory or the mounted directory.
8:18This is also used for mounting, but this is more typically used to temporarily mount an actual file system. The next one we have is the op directory. Quite simply, this is where optional third party libraries tend to be stored. So as we're going to see later on when you happen to install particular packages, very often the actual files that are pulled in happen to be stored in this location right here. The next one is the proc directory, which is where we can find information relating to processes running on our system. One thing to note about this particular directory is that it happens to be a virtual directory that is just created in memory when the system happens to boot.
8:56So if you shut the system down, this here does not exist on disc, but once you reboot the system back up, it's going to regenerate this file system and pull information relating to those running processes as well as some additional kernel information. So if you happen to create a new process on your Linux system dynamically, automatically information is going to be generated and stored within this directory right here. Next we have the root directory. Remember I said, don't confuse yourself with the forward slash and the root directory.
9:27The forward slash is the true parent directory for all other directories, whereas the root directory is much like the home directory in that it's a personal space, so to speak, but it's a personal space for the administrator accounts. So not for the user accounts like IPV Zero or if I created a new user called Simona. IPV zero, and Simona would have directories within the home directory. That would be their own personal space, but the actual root accounts, this would be separate for them entirely.
9:58So the semantics can be a little bit confusing, because both would be referred to as the root directory. Just try to keep that distinction in your head. The run directory is going to keep information relating to runtime data. So say for example, things like users who happen to be logged into the system, that type of thing. The sbin directory, much like the bin directory is going to have binary files, these executable programs, but these are going to be the system wide binaries. Pretty much this is going to be related to your sudo command, the super user elevated privileges.
10:30The next one I want to talk to you about is the temp directory. This is a place designated for temporary files. Very often the information within this directory is going to be white when the system is rebooted. Next we have the user directory. This is going to store system wide read only files. And the last one I want to talk to you about is the VAR directory. Pretty much, once again, the name is quite descriptive. This is where we're going to store variable data. So pretty much data that is going to be well varying and changing.
11:02So things like logs, for example, something that's going to be continually being written to and updated and varying, or perhaps things such as mail messages that are continually being updated as new mail comes in. So these are some of the basics behind the file system hierarchy standard. Like I say, they do not always have to be the exact same across all distributions, but by understanding these basic concepts, where to find what and what directory, that is going to make you much more comfortable navigating the Linux system.
Validation
0:00[Instructor] Okay, friends, so here is the scenario to validate what we've learned here. Now, what we're going to see here might be a little bit challenging, but it's been done so by design. Let me walk you through it. The first thing I want you to do is to power on your virtual machine. Then once that is done, log in with your own user account that you have created. Then what I want you to do is to open a virtual terminal. After that, I want you to go to the directory that is used as your user's own personal space. Recall, we talked about all the different directories.
0:32Try to remember the one that was used for the personal space, and here is the more challenging part. Once you have navigated to that directory, I want you to list the contents of that directory whilst also displaying the inode number for each file. Now, this part here is the part that is a little bit confusing. Right now we have not described what an inode number is at all, so if this is completely confusing to you, that is absolutely okay. That is not the purpose of what we're trying to do here. We will definitely discuss what inode numbers are in due time, but I just want to put you in a challenging situation and try to recall how we might be able to find this particular piece of information.
1:13Because even if you don't know what an inode number is, if you just follow along with what we said within this skill, hopefully you should be able to find out how to actually display this information. So by all means, power on this virtual machine, give this task a thought, and I will see you in the next video where we discuss the solution.
Validation
0:00So friends, let's walk through this solution. So what I will do is I will power on my machine. Just hit the button here. Okay, so here is my username. I will just click on this, type in my password to log in. Perfect. Now that I've logged in, I'm going to go up to activities up here and then I'm going to choose the terminal. This is how I can open a virtual terminal. Now remember, the first task was to go to the directory whereby you would keep your own personal files. Now here is the thing, by default, you will already be in that particular directory, but I never told you that beforehand.
0:33So if you knew that you didn't have to change directory, then double bonus points for you. But let's walk through the process that we saw earlier on within this scale. Where do we know that we can go to see all of the directories within the file system hierarchy standard? We can go to the root directory and recall that is not the word route. That is actually the forward slash root. So if we say CD forward slash, and now I do a listing of all those directories. Here they are right here. Now which one will I go to for me as the user IPV zero to find my own personal space?
1:06Well, that is going to be in the home directory. So if I say CD home and I do a listing again, I'm going to see a directory with my username on it. Now you at home no doubt, will have a different username. So all you will do is say CD and then give your username. So if I just say CD IPV zero, now I'm in my own personal working space. Now the challenging part was here is that whilst we are in this directory, we want to create a listing of the contents within here. Now recall the command that I was using throughout this scale to actually show you the contents inside the directory was the LS command.
1:40This is for listing. Now I added a rather strange and peculiar request. I also said that we wanted to list the inode information. Now again, we don't really know what that is quite just yet, but let's suppose we come to the examination and there is also something that you're a little bit unsure of. What tool can we use to help us find this information? Well, we know we can use the man page. So if you want to list something, let's look at the man page for the list command, which is as we know LS. So I'll say man, LS, and whilst else we are in here, we can press the space bar to go through all of the pages.
2:15But to make things easier, why don't we just search for the word inodes? Now, how do we actually do that? Well, we can do that recall by doing the forward slash, which we can see in the bottom left now. And if I just type in the word inodes and hit return, that actually snaps me to the option that I can use with this command in order to print that inode number. So what I can do here is say LS dash I or if I so wish, LS dash dash inode, either of which is going to work. So what I will do is I will press Q to quit and if I say LS, we get a regular listing.
2:48But if I say LS dash I and hit enter, now we are successfully printing the contents of this home directory, this personal private space for us as the user with those associated inode numbers. So even though we don't know what inode numbers are quite just yet, hopefully you were able to figure out that perhaps by searching the man page for the LS command we could find information relating to the inode information. But if you did not get the solution, then definitely do not worry. We're going to study all of this content in a lot more detail as we progress throughout this course, but for now, that is all for getting set up on a Red Hat Linux enterprise environment.
3:26I hope this has been informative for you and I'd like to thank you for viewing.
Frequently asked questions
What does the Introduction to RHCSA lesson cover?
In this 52-minute lesson, a team member learns the hands-on, performance-based format of the RHCSA EX200 exam, sets up a virtualization platform, and installs Red Hat Enterprise Linux with a snapshot as a rescue point. The lesson then covers shells and virtual terminals, the who command, man page sections 1, 5, and 8, and key directories in the Linux file system hierarchy standard such as the home directory and /var.
What is the format of the RHCSA EX200 exam, and can candidates use the internet or documentation?
The lesson explains that EX200 is a hands-on practical exam in which candidates perform real-world tasks. Candidates have no internet access during the exam and cannot bring in any documentation, which is why the lesson teaches man pages as the built-in way to look up command syntax.
Which virtualization software is needed to follow the RHCSA lab setup?
The trainer demonstrates the setup in VMware and notes that VirtualBox, UTM, and other tools work as well, depending on the learner's platform. After installing Red Hat Enterprise Linux, the learner takes a snapshot so the virtual machine can be returned to a clean state if a mistake is made.
What are man page sections 1, 5, and 8 in Red Hat Enterprise Linux?
The lesson explains that section 1 covers user commands such as ls, section 5 covers file formats, and section 8 covers system commands intended for the root user, such as visudo. The trainer focuses on these three sections because they are the ones most relevant to RHCSA work.
What hands-on task does a team member complete at the end of this lesson?
In the validation scenario, the learner powers on the virtual machine, logs in with their own user account, opens a virtual terminal, and goes to their home directory. They then search the ls man page to find the option that displays the directory contents with inode numbers, which the solution shows is ls -i.
How does this lesson fit into the full RHCSA EX200 course for an IT team?
This lesson is the starting point for a course of about 19 hours, 22 minutes per learner that goes on to cover users and groups, permissions, storage with LVM and Stratis, systemd services, networking, security, and containers. For an IT Director or Team Lead, it gives every junior admin the same lab environment and command-line foundation before the team moves into the operational domains assigned later in the course.
Team training path
Turn this skill into assignable team training
This free skill is a preview of the courses your team can assign, track, and report on with CBT Nuggets.
Free training library
More free lessons in Linux
Linux
Introduction to LPIC-1
Free lesson from Linux Professional Institute LPIC-1 (101-500 & 102-500) · 49m
Linux
Understand Linux Fundamentals
Free lesson from CompTIA Linux+ (XK0-005) · 49m
Linux
Install and Configure the Apache Web Server in Linux
Free lesson from Everything Linux · 52m
Linux
Monitor & Measure Resources Usage
Free lesson from Linux Professional Institute LPIC-2 (201-450 & 202-450) · 56m
Linux
Linux Evolution and Popular Operating Systems
Free lesson from LPI Linux Essentials (010-160) · 52m
Linux
X.509, Web Certificates, and Hashing
Free lesson from Linux Professional Institute Security Essentials (020-100) · 49m
$59
seat / mo, billed annually
