Synopsis: Chapter 2 Linux Directory Structure
This first section is a synopsis of the chapter using the headings and subheadings from the textbook, with descriptions in my own words.
- Common Top-Level Directories
- / The Root Directory
- Everything else is located below the root directory.
- Full access to root is usually restricted, especially on multi-user systems like servers.
- /bin Binaries
- Programs are stored in the directory for binaries, since they normally are in that format to run.
- The directory /usr/bin is home to user installed binaries.
- A convention that I am aware of is that normally, binaries need to be placed in a directory named bin to run, although it usually can be any directory named bin.
- /etc System Configuration Files
- The Et Cetera directory is used to store system configuration files, such as screen resolution, other X Window System settings, and network settings, to name a few..
- /home Home Directories
- The Home directory is a user’s primary directory to use. The user’s own files are kept here.
- /opt Optional or Third-Party Software
- Most user-installed programs are located here, such as Spotify or Chrome.
- /tmp Temporary Space
- Files that are only needed temporarily are normally stored in a temporary space directory, such as caches and compressed software downloads.
- /usr User-Related Data, Read-Only
- This is where user installed software and its documentation is located.
- /var Variable Data
- Logs and such are normally stored in variable data directories.
- Application Directory Structures
- There isn’t much I can say about this, other than that the paths typically are either usr/local/applicationName or opt/applicationName. Also, sometimes libraries or logs used by a program are located in places like /var/opt/applicationName as well.
- Organizational Directory Structures
- Sometimes directories are named after teams or organizations, such as /MCC or /Romanov.
Questions and Observations
I am not sure what is the practical difference, besides the name and location, between usr/local and usr/bin. Is it that usr/bin contains only binaries while usr/local can contain other types of files as well? I’m also unsure as to what the practical difference between usr/local and /opt, . It’s worth noting that the file system root is not exactly analogous to C:/ on Windows, because other drives are not mounted below C:/ on Windows, rather they have their own drive letters. On GNU/Linux and UNIX systems, root is the directory that is at the root of the directory tree, hence the name root.
Here is a link (https://youtu.be/vjMZssWMweA) to an interesting Documentary about GNU/Linux.
No comments:
Post a Comment