answersLogoWhite

0

I am assuming this question is asking about what the toplevel directories are defined as in the FHS for Linux:

/ is the very base directory of the entire filesystem tree of a Linux system. Think of it as being not unlike C:\ to Windows users. Though Linux doesn't use drive letters for mounting media, but mount points.

/bin is for essential non-administrative utilities and program binaries. Stuff like ls, cp, mv, and shells are stored here. You will NOT find most of your APPLICATIONS here, however, those are most likely to be found in /usr/bin.

/boot is where your kernel images and boot configurations are kept. When your Linux machine loads, one of the very first things that gets read from the hard disk are stored here.

/dev is a virttual filesystem populated with special files that represent all your supported hardware and some virtual hardware like /dev/null. Often when software is using your hardware, it is using system calls on these files.

/etc is where most of your system-wide and critical configuration and system intiailization files are kept. Think of this as being like the system branches of the Windows registry: Meant for defining how the system works and not meant ot be played with lightly. Fortunately since almost all these files are plaintext, if something is broken, often in configuration, you can easily use a LiveCD to fix your install.

/home is where user data and settings are stored. Think of it as being C:\Users or C:\Documents and Settings in Windows. It is in the users' own home directories normal users are actually allowed full file access privileges. Changing almost anything outside your home will require elevated privileges (root or sudo.).

/lib and /lib64 are for system-critical libraries. /lib will also contain ALL of your device drivers (.ko files, also known as loadable kernel modules.). This is basically like C:\Windows\System32.

ext2/3/4 users will also find /lost+found. This is a file system feature used to recover orphaned files the system can't really figure out what they are or where they belong. ext4 users might never see this used due to the journal.

/mnt is for mounting filesystems. Remember that Linux does not use drive letters, but mounts filesystems onto the tree. /mnt is one of the "standard" mount points for non-removeable filesystems not normally part of the Linux system proper, such as Windows filesystems.

/opt is for "add-on optional software." Linux distribution maintainers generally use it to chuck applications and other software that either doesn't work with the FHS or is too big to make work with the FHS. A lot, if not most, proprietary software will wind up in here. Due to it not using any sort of formal structure, it's not unlike C:\Program Files, except it's less commonly used.

/proc is another virtual filesystem. This time it's used to "read the mind" of the kernel. Just about any actual information the kernel is tracking and aware of can be found in here including complete process information and various system information not regarding the hardware itself will be in here.

/root is the root user's home directory. Not much can be found in here, though some settings for root will be stored in this directory. Usually can't even be read by normal users.

/run is a not-FHS-compliant directory. It's the same as /var/run, it's for volatile runtime files the system likes to keep track of. It's not generally a virtual filesystem, but it's often just used as an IPC/tracking mechanism for userspace. /run was placed on / largely due to systemd becoming far more prevalent in Linux.

/sbin is for vital system binaries that ormal users will not use but administrators most definitely will. A great deal of these tools will not even be able to perform their intended function with normal user privileges.

/srv is not always found, it's generally available as a sort of "home" for server daemons to store and provide data from. Most Linux webservers will have some web sites stored here.

/sys is the third and final "vital virtual filesystem." Where /dev provides device files as interfaces to hardware and /proc is all about the kernel's state and "thoughts" exposed in file form, /sys is all about your hardware, descriptions of what your hardware is like and what it can do. Often udev and a lot of device drivers will use this directory to determine what kind of files will be created and how they will be accessible from /dev. /sys outlines how your hardware is connected and what type of hardware it is.

/tmp is temporary files. A lot of Linux systems mount it as tmpfs and this will usually be cleared out by Linux systems on every shutdown and every boot. It's basically a temporary file dump of files often used for a myriad of purposes. Users can even dump temporary files in here they don't need to care about later.

/usr is the "secondary" hierarchy. To the user this is often the "applications" folder. It'll contain applications, assets for those applications. documentation, non-essential libraries, headers, you name it.

/var is about volatile, ever changing data, but not TEMPORARY data. Things like databases and file locks and various other important, but "fluid" files will be kept here. PAckage managers often have all the package information stored here. /var is also very frequently used as a cache for a lot of applications as well. Again, your package manager will likely put one or two versions of all your installed packages in here so that if you remove a packae but want to reinstall it you won't have to redownload the package again from a repository.

User Avatar

Wiki User

12y ago

What else can I help you with?