Linux 101: Demystifying the Linux directory structure

2 years ago 360

Jack Wallen helps you to recognize what is housed successful each of the directories recovered nether the basal directory successful Linux.

Linux written connected  insubstantial  sitting connected  folder

Image: Hadayeva Sviatlana/Shutterstock

Some caller users person occupation knowing the Linux directory structure, truthful I thought I'd instrumentality a infinitesimal to demystify those unusual folder names. It's not astir arsenic analyzable arsenic you mightiness think. Once you recognize what's what, it each starts to marque sense. 

SEE: C++ programming language: How it became the instauration for everything, and what's adjacent (free PDF) (TechRepublic)

That said, let's instrumentality a look astatine these unusual directories. 

  • First is the basal directory, which is often noted by a guardant slash (/). This houses everything connected your Linux system, truthful it's beauteous important. 
  • Next up is /bin, which contains each indispensable executable binaries that are required for a strategy to relation successful single-user mode. These executables aren't idiosyncratic applications, but indispensable commands that are utilized by the strategy (but tin besides beryllium utilized by users), specified arsenic less and ip
  • Next is /boot, which contains each the files required for the strategy to boot. You'll past find /dev, which contains respective peculiar instrumentality files, specified arsenic /dev/sda, which correspond hardware and virtual devices. 
  • The /etc thrust is wherever each of the system-wide configuration files for applications and services are. 
  • The location directory, which is /home, houses each directories for users. 
  • Library files (which are utilized by indispensable binaries) are recovered successful /lib. 
  • There's besides the /lost+found directory, which stores recovered files that are utilized successful lawsuit of a strategy crash. 
  • The /media directory contains each subdirectories for removable devices (such arsenic outer drives). 
  • The /opt directory is for optional packages and serves arsenic a communal determination for proprietary bundle that doesn't thin to travel the modular record strategy hierarchy. 
  • System and process accusation files are stored successful /proc. 
  • The Root idiosyncratic location directory is isolated from location and is recovered successful /root. 
  • Applications tin store transient files for sockets and process IDs successful the /run directory. 
  • The /sbin directory houses much executable binary files, but these are those that are utilized chiefly for strategy administration. 
  • The Service Data folder (/srv) is simply a determination that houses information for services that are provided by the strategy (such arsenic for the Apache webserver). 
  • All impermanent files are stored successful /tmp and are deleted erstwhile the strategy is restarted. 
  • User binaries (applications utilized lone by the idiosyncratic and not by the system) are stored successful /usr. 
  • And finally, the /var directory houses each adaptable information files, specified arsenic log files (in /var/log) arsenic good arsenic the Apache papers basal (in /var/www/html/). 

And that's the Linux directory operation demystified. Once you recognize however this operation is laid out, Linux becomes considerably easier.

Subscribe to TechRepublic's How To Make Tech Work connected YouTube for each the latest tech proposal for concern pros from Jack Wallen.

Open Source Weekly Newsletter

You don't privation to miss our tips, tutorials, and commentary connected the Linux OS and unfastened root applications. Delivered Tuesdays

Sign up today

Also see

Read Entire Article