Fireship · @fireship
Linux Directories Explained in 100 Seconds
Uploaded February 12, 2021 · Length 2:53
Summary
linux file system hierarchy explained in 100 seconds, including directories and their uses.
- linux file system
- linux directories
- file system hierarchy
- linux basics
- linux for beginners
Transcript preview
The first 2 minutes of the transcript. Select a timestamp to watch that moment on YouTube.
- 0:00
the linux file system it's a cryptic
- 0:02
labyrinth of directories defined by the
- 0:04
file system hierarchy standard
- 0:06
navigate through it with the change
- 0:08
directory command cd forward slash drops
- 0:10
you into the root
- 0:11
then with the ls command we can list out
- 0:13
the contents of this directory
- 0:15
first we have the bin directory which
- 0:17
contains binaries or
- 0:18
executables that are essential to the
- 0:20
entire operating system
- 0:22
you can run these binaries from the
- 0:23
command line at any time things like
- 0:25
gzip curl and even the ls command that
- 0:27
we just ran
- 0:28
but confusingly there's also an s-bin
- 0:31
directory it contains system binaries
- 0:33
that should only be executed by the root
- 0:35
user
- 0:35
like mount or delete user many of these
- 0:38
binaries may share common libraries
- 0:40
which are stored in the lib directory
- 0:42
now we also have a usr
- 0:44
user directory with its own bin and
- 0:46
s-bin directories
- 0:47
the binaries or applications here are
- 0:50
non-essential to the operating system
- 0:51
itself and intended for the end user
- 0:54
you'll also notice a local directory
- 0:56
under user
- 0:56
it contains any binaries that you
- 0:58
compile manually to provide a safe place
- 1:00
that won't conflict with any software
- 1:02
installed by a system package manager
- 1:04
all these binaries get mapped together
- 1:06
with the path environment variable
- 1:08
and that's why you can execute them from
- 1:10
any directory in the terminal if you
- 1:12
ever want to know where a binary lives
- 1:14
run which followed by the binary name to
- 1:16
view its full path
- 1:17
in the file system now at some point you
- 1:19
may want to customize the behavior of
- 1:21
the software on your system
- 1:22
the etc directory stands for etc or
- 1:25
editable text configuration
- 1:26
many of these files end in conf and
- 1:28
they're typically just text-based config
- 1:30
files that you can modify
- 1:31
in your editor as an operating system
- 1:34
linux can support multiple users
- 1:36
in the home directory you'll find a
- 1:37
folder named after each user registered
- 1:39
on the system
- 1:40
it contains the files configuration and
- 1:42
software for that user
- 1:44
and you need to be logged in as that
- 1:45
user or as a root user to modify it
- 1:48
notice how the file path is a squiggly
- 1:50
that's your normal starting location
- 1:51
when you open up a terminal session
- 1:53
now let's go back to the root there are
- 1:55
a few more directories here that we
- 1:56
haven't talked about yet
- 1:57
like boot it contains the files needed


