Linux 101: Demystifying the Linux Directory Structure

Jack Wallen helps you figure out what is hosted in each of the directories found under the Linux root directory.

Image: Hadayeva Sviatlana / Shutterstock

Some new users have a hard time understanding Linux directory structure, so I thought I would take a moment to debunk these weird folder names. It’s not as complicated as you might think. Once you understand what is what, it all starts to make sense.

SEE: C ++ Programming Language: How It Came The Basis Of Everything And What’s Next (Free PDF) (TechRepublic)

With that said, let’s take a look at these weird directories.

  • The first is the root directory, which is often indicated by a forward slash (/). This hosts everything on your Linux system, so it’s pretty important.
  • The next step is / bin, which contains all of the essential executables needed to run a system in single-user mode. These executables are not user applications, but essential commands that are used by the system (but can also be used by users), such as less and ip.
  • Next is / boot, which contains all the files needed to boot the system. Next you will find / dev, which contains several special device files, such as / dev / sda, which represent both hardware and virtual devices.
  • The / etc drive is where all of the system-wide configuration files for applications and services are located.
  • The home directory, which is / home, contains all of the user directories.
  • Library files (which are used by core binaries) are located in / lib.
  • There is also the / lost + found directory, which stores recovered files that are used in the event of a system crash.
  • The / media directory contains all subdirectories for removable devices (such as external drives).
  • The / opt directory is for optional packages and serves as a common location for proprietary software that does not tend to follow the standard file system hierarchy.
  • System and process information files are stored in / proc.
  • The root user’s home directory is isolated from home and is located in / root.
  • Applications can store transient files for sockets and process IDs in the / run directory.
  • The / sbin directory contains more executable binaries, but these are the ones that are primarily used for system administration.
  • The Service Data (/ srv) folder is a location that hosts data for system-provided services (such as the Apache web server).
  • All temporary files are stored in / tmp and are deleted when the system is restarted.
  • User binaries (applications used only by the user, not by the system) are stored in / usr.
  • And finally, the / var directory contains all the variable data files, such as the log files (in / var / log) as well as the root of the Apache document (in / var / www / html /).

And here is the Linux directory structure demystified. Once you understand how this structure is presented, Linux becomes considerably easier.

Subscribe to TechRepublic How to make technology work on YouTube for all the latest technical advice for business professionals from Jack Wallen.

Also look

Source link

About Adam Gray

Adam Gray

Check Also

The Minimum Guide to Local SEO for a Small Business

The thing you learn about owning a small business is that there is always something …

Leave a Reply

Your email address will not be published. Required fields are marked *