Fireship · @fireship

Linux Directories Explained in 100 Seconds

Uploaded February 12, 2021 · Length 2:53

Linux Directories Explained in 100 Seconds

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.

  1. 0:00

    the linux file system it's a cryptic

  2. 0:02

    labyrinth of directories defined by the

  3. 0:04

    file system hierarchy standard

  4. 0:06

    navigate through it with the change

  5. 0:08

    directory command cd forward slash drops

  6. 0:10

    you into the root

  7. 0:11

    then with the ls command we can list out

  8. 0:13

    the contents of this directory

  9. 0:15

    first we have the bin directory which

  10. 0:17

    contains binaries or

  11. 0:18

    executables that are essential to the

  12. 0:20

    entire operating system

  13. 0:22

    you can run these binaries from the

  14. 0:23

    command line at any time things like

  15. 0:25

    gzip curl and even the ls command that

  16. 0:27

    we just ran

  17. 0:28

    but confusingly there's also an s-bin

  18. 0:31

    directory it contains system binaries

  19. 0:33

    that should only be executed by the root

  20. 0:35

    user

  21. 0:35

    like mount or delete user many of these

  22. 0:38

    binaries may share common libraries

  23. 0:40

    which are stored in the lib directory

  24. 0:42

    now we also have a usr

  25. 0:44

    user directory with its own bin and

  26. 0:46

    s-bin directories

  27. 0:47

    the binaries or applications here are

  28. 0:50

    non-essential to the operating system

  29. 0:51

    itself and intended for the end user

  30. 0:54

    you'll also notice a local directory

  31. 0:56

    under user

  32. 0:56

    it contains any binaries that you

  33. 0:58

    compile manually to provide a safe place

  34. 1:00

    that won't conflict with any software

  35. 1:02

    installed by a system package manager

  36. 1:04

    all these binaries get mapped together

  37. 1:06

    with the path environment variable

  38. 1:08

    and that's why you can execute them from

  39. 1:10

    any directory in the terminal if you

  40. 1:12

    ever want to know where a binary lives

  41. 1:14

    run which followed by the binary name to

  42. 1:16

    view its full path

  43. 1:17

    in the file system now at some point you

  44. 1:19

    may want to customize the behavior of

  45. 1:21

    the software on your system

  46. 1:22

    the etc directory stands for etc or

  47. 1:25

    editable text configuration

  48. 1:26

    many of these files end in conf and

  49. 1:28

    they're typically just text-based config

  50. 1:30

    files that you can modify

  51. 1:31

    in your editor as an operating system

  52. 1:34

    linux can support multiple users

  53. 1:36

    in the home directory you'll find a

  54. 1:37

    folder named after each user registered

  55. 1:39

    on the system

  56. 1:40

    it contains the files configuration and

  57. 1:42

    software for that user

  58. 1:44

    and you need to be logged in as that

  59. 1:45

    user or as a root user to modify it

  60. 1:48

    notice how the file path is a squiggly

  61. 1:50

    that's your normal starting location

  62. 1:51

    when you open up a terminal session

  63. 1:53

    now let's go back to the root there are

  64. 1:55

    a few more directories here that we

  65. 1:56

    haven't talked about yet

  66. 1:57

    like boot it contains the files needed