The File Hierarchy Standard is a collaborative document
that specifies a set of guidelines
for the names of files and directories
and their locations on a Linux system.
Most Linux distributions are FHS compliant
and therefore support compatibility with other systems.
The FHS also creates a naming convention
that helps administrators, users, and applications
consistently find the files that they're looking for
as well as store files
where other entities can easily find them.
So in this demonstration,
we're going to walk through just simple ways
to navigate the Linux file structure.
We're going to go through some shortcuts and little tricks.
First thing we need to think about and understand is
absolute path versus relative path.
So an absolute path is going to be
when you're using the forward slash.
That means you're going to start from the route directory
and go to the follow the directory that you're looking for.
For example, if you want a CD to the user bin,
that's the absolute path.
Now, if we look in the list,
we can see that there's multiple different
directors and files in here.
So here, what we can use is a symbol
called the tilde symbol.
That brings us back to the home directory.
So now we can easily have a shortcut
to go back to our home directory
and list out any, you know files or anything like that,
that we're interested in getting to.
Now, to get to another director
within the current director you're working with,
that's going to be a relative one.
So for example, I'm just going to cd into desktop.
And you see,
I didn't have to use the forward slash to get there
because Linux knows,
okay, if they omit the forward slash,
we're only going to search in the present working directory.
Now another directory to be familiar with
is the root directory.
Now you'll switch to root really quick.
And if we look,
it's going to automatically put us in the roots home directory,
okay.
It's not going to be the root directory, which is the slash.
So again, this is the root directory.
But if we look at the actual root user,
they have their own directory.
So if I see the,
you'll see I'm currently in the roots working directory,
so it's a slight difference.
Now let's exit out of here.
Go back to my own working directory.
Again, it's going to bring us back to where we currently were.
All right, because every user, whenever they're created,
again has their own working directory
under the home folder.
So any user that's assigned to this operating system
will have their own directory under the home folder.
Another system to be familiar with,
a little bit more practice, is the etc directory.
This one contains a lot of different information.
Typically configuration files
for many services and applications
that you're going to be running.
So can list a few out here.
Again you'll be using the etc folder a lot.
Just a lot of different useful things
that most system admins are going to have to use.
Okay.
Now just to show how the
relative and absolute directories works,
just show that's an error.
So if we were just try to, let's say,
let's go back to our home directory.
And just say we wanted to go back to etc
and we just did this.
It's going to give us this error.
Again because it's searching
in our present working directory
and there's no etc directory available there.
But once we add the forward slash,
now we're in the etc directory.
Just a tidbit of information.
Again, the bin folder,
that's going to contain a lot of our binary command tools.
So this is going to store pretty much all of our
command functions and essential tools
when we're typing a command line.
For example, if we're using the list command.
So we're listing out the directories and folders,
that command has to be stored somewhere.
And again, the bin, which is,
since we're binary folder,
is where all these commands are stored.
Now this directory typically stores a lot
of our third party installations.
So as you see,
I don't really have any going on here.
But that's where if they were to be installed on the system,
it'll be stored in its option folder.
And the last folder we're just going to go over
is just the prop folder.
Again, this one's going to have
most of our directories.
That's for the virtual file system.
So it represents the information
that's reported by the Colonel.
And again, most distributions use this FHS hierarchy.
So just to make sure that it's consistent
across all of the Linux distributions.
I'll see you in the next lesson.