Filesystem Types

Video Activity
Join over 3 million cybersecurity professionals advancing their career
Sign up with
Required fields are marked with an *
or

Already have an account? Sign In »

Time
21 hours 25 minutes
Difficulty
Intermediate
CEU/CPE
21
Video Transcription
00:00
>> Hey there Cyberians.
00:00
Welcome back to the Linux plus course here at Cybrary.
00:00
I'm your instructor Rob Giles,
00:00
and in today's lesson we're going to be
00:00
discussing file system types.
00:00
Upon completion of today's lesson,
00:00
you're going to be able to understand
00:00
real and virtual file systems in Linux,
00:00
we're also going to talk about
00:00
the Linux file system hierarchy,
00:00
and we're going to discuss
00:00
>> the dev insist directories in
00:00
>> Linux.. Real file systems
00:00
are file systems that live on disk,
00:00
they exist on a physical storage device,
00:00
and the easiest way to determine what is
00:00
a real file system is to use the lsblk command,
00:00
we're looking in proc partitions,
00:00
just do a cut in proc partitions.
00:00
For example, we can see a screenshot I
00:00
took over here of my Ubuntu system
00:00
using lsblk to display the actual real file systems.
00:00
In this case, we can see that root,
00:00
boot, swap and home,
00:00
are all real files systems that live on
00:00
the disk sda, in various partitions.
00:00
Now, by comparison, virtual file systems
00:00
are another thing [inaudible] be aware of,
00:00
and we'll talk more about this later.
00:00
We'll talk about a couple
00:00
of different directories that are
00:00
considered virtual file systems,
00:00
or pseudo file systems,
00:00
and Linux uses a virtual directory structure.
00:00
Kernel modules and an abstraction layer called the
00:00
VFS make up the default implementation of Linux.
00:00
When you're looking at a Linux file system,
00:00
it's actually a virtual file system.
00:00
Now, Linux and UNIX both have a concept that is
00:00
called the File System Hierarchy standard,
00:00
and it's the standard format for Linux virtual directory.
00:00
The FHS defines the suggested locations
00:00
for most directories and
00:00
files that we're going to see in Linux,
00:00
and if you wanted to really get into it,
00:00
take a look at that spec at that link.
00:00
Now, let's talk about some common FHS folders,
00:00
and we probably are familiar with these if you've
00:00
come from an earlier course in Linux.
00:00
But just as a brief recap,
00:00
the root file system is a real file system.
00:00
It lives up at the top of the directory structure here,
00:00
and we can see that that is the root right there.
00:00
Then the boot contains
00:00
our boot files, module 1 flashback.
00:00
We went in the boot directory to get to our boot files.
00:00
The home directory contains user files.
00:00
This is where most stuff is going to
00:00
live for users on your system.
00:00
It can be mounted from elsewhere,
00:00
or it could actually be a real file system living
00:00
on your Linux server.
00:00
The opt directory is
00:00
used for optional third party programs.
00:00
Usr is used for standard Linux programs,
00:00
but these last three,
00:00
dev, sys, proc,
00:00
or pseudo are virtual file systems.
00:00
Now, dev contains device files
00:00
while sys contains device and bus info,
00:00
and proc provides process information.
00:00
Let's talk a little bit more about the dev file system,
00:00
and as mentioned previously,
00:00
dev is a pseudo or virtual file system.
00:00
That means that the file lives in memory.
00:00
It's not stored on disk, so when
00:00
you turn off your computer,
00:00
all of this information gets wiped out.
00:00
It's just dynamically generated
00:00
while the system is turned on,
00:00
and this information lives in memory.
00:00
The dev directory is used by
00:00
the kernel to access physical devices.
00:00
We can see the devices that are on the system there,
00:00
and we can see all of the dev sda stuff
00:00
if we go there, grep for sd,
00:00
but if we just do ls dev,
00:00
we can see a lot more devices,
00:00
and these are all things that the kernel
00:00
uses to talk to those physical devices.
00:00
Now, I mentioned previously the sys directory is
00:00
another pseudo or virtual file system
00:00
that lives in memory,
00:00
and the sys directory is used by the kernel
00:00
to get information on devices and buses.
00:00
What we can see over here,
00:00
if we do a [inaudible] and sys bloc,
00:00
what it actually has is a bunch of
00:00
pointers to the physical devices.
00:00
We see for instance, the sda is a pointer
00:00
to devise PCI, [inaudible].
00:00
That is how the kernel understands how
00:00
to get to the device and the device bus,
00:00
for the physical devices on the system.
00:00
But with that, we've reached the end of the lesson.
00:00
In today's lesson, we covered the difference
00:00
between real and virtual file systems,
00:00
we had a brief discussion or
00:00
a recap of the Linux FHS standard,
00:00
and we talked about the purpose of
00:00
the dev and sys directories.
00:00
Thanks so much for being here,
00:00
and I look forward to seeing you in the next lesson.
Up Next