The way
This article was written to help new users get a grasp on moving through directories on their new installation. One key point to make is Windows deals with "drives" as in your C: drive or D: drive,
It All Begins With Root: /
The root directory known simply as '/' is the starting point. Without getting to technical, the root directory acts like the 'C: Drive' in Windows. A
It's In: /bin
The /bin folder holds important system programs. The 'bin' is short for 'binary'. Some of the popular programs: date, less, more, cat, dmesg. These programs are essential in order to start and have a complete operating system. While you may never use one of these programs personally, the system relies on some of them.
Where Everything Starts: /boot
As the name implies, /boot is where the crucial files reside, mainly the kernel. Without the kernel, you don't have a system. Another crucial program located in /boot is the bootloader. Just like
Every Device Is A File: /dev
In
Configuration-ness: /etc
The Shared Libraries: /lib
The /lib directory is a way to keep all software libraries in one central location. Most (if not all) files here have a file extension of '.so' to let you know they are 'shared object' files. These files are code that can be used by multiple programs. This helps prevent a problem known as 'software bloat'. Windows also has these files; they are called 'Dynamically Linked Libraries' or DLL for short. As a regular
When You Don't Shut Down Correctly: /lost+found
This directory is used when the user does not shut down the system correctly (turning it off when the system is still up and running). Upon the next boot, the system will try and correct itself by scanning the hard drive for corrupt files and try to correct any problems that arise. If anything is found, it will be placed in the /lost+found directory for the systems administrator (you!) to see and look over.
Where The 'Mount Points' Live: /mnt and /media
The /mnt and /media directories are for 'attaching' other devices to the root directory. In Windows, when you insert a USB thumbstick, you will see the system gives it a drive letter (E:). Depending on which
/media is the newcomer to the
The 'Optional' Directory: /opt
This is where users can install software if no other suitable location can be used. Most software from major
My personal rule of thumb is to use /opt when the software you are installing defaults to this directory (The Google Earth program does this) or I am installing a program that I didn't get in the software repository.
The Kernel's Directory: /proc and /sys
Both of these directories hold a wealth of information about the status of your system. Files like '/proc/cpuinfo' contain information about your CPU (speed, vendor, cache size). The /proc directory is slowly being faded out in favor of /sys.
You Were Here And Now Your Gone: /tmp
The /tmp directory is short for 'temporary'. So with that in mind, I am sure you can deduce why this directory is used. You got it, to manage temporary files. Programs can generate a lot of 'junk output' or need to write to a file to handle a task; but the file can be deleted once the task is completed. This directory provides a central location to do this and not fill your other directories with these files.
Where The Programs Live: /usr
The /usr directory is a monster. Articles could be written just to explain it all. But to keep things short and sweet, the /usr is where all of your 'secondary' programs are stored. Granted you love your music player, but it's not crucial to your operating system actually functioning. So instead of putting all the executables in /bin, we break it up a bit. We place crucial system programs in /bin and non-critical programs into /usr/bin. The /usr directory could be seen as the Windows equivalent as C:Program Files.
The Not So Temporary Files: /var
/var (for varying or variable) acts like /tmp in the sense that the files located are 'temporary' but less 'temporary' then those in /tmp. What this really means is the /tmp directory will most likely be deleted every time the system reboots, while the files in /var will not. /var is a place to keep 'persistent' files. An example would be log files. Most system administrators wouldn't want to delete their log files on every reboot, but the files could be removed or 'shrunk' to a more manageable level at the administrators whim.
Another example would be '/var/mail' directory. It contains the mail being sent to users on the system. Some users will have hundreds of messages, while other users will have a few or none. The directory is growing and shrinking depending on the usage by the users. So in order to keep the disk usage under manageable levels, we place this activity under /var. On large systems, the system administrator will use a separate hard drive and 'mount' the hard drive at /var. This allows the frequent disk access to remain on one hard drive and keep the overall system speedy.
Conclusion
Well I hoped that this article has better acquainted you to how files are stored on a
Source by Brandon Sherwood
Post a Comment