The role of each directory in Linux systems

Source: Internet
Author: User


Summarizing the role of some Linux directories is a little useful for beginners.

/
This is the root directory. For your computer, there is only one root directory. All things, I mean, everything starts here. For example: When you enter "/home" in the terminal, you are actually telling the computer to start with the/(root directory) and then go to the home directory.
/root
This is the directory of the system administrator (root user). For the system, the system administrator is like God, it can do anything to the system, even including deleting your files. Therefore, be careful with the root account.
/bin
The standard (or default) Linux tools are stored here, such as "LS", "VI" and "more". Typically, this directory is already included in your "path" system variable. What do you mean? is: When you enter LS in the terminal, the system will go to the/bin directory to find out if there is LS this program.
/etc
The system configuration files are mainly stored here. For example: You installed the Samba suite, and when you want to modify the Samba configuration file, you will find that they (config file) are in the/etc/samba directory.
/dev
The main store is the files related to the device (including peripherals) (Unix and Linux systems treat the device as a file). The system starts working from this directory. There are also some disk drivers, USB drivers, etc. are put in this directory.
/home
Your personal data is primarily stored here. Each user's settings file, the user's desktop folder, and the user's data are all placed here. Each user has his or her own user directory, located at:/home/user name. Of course, the root user is excluded.
/tmp
This is the temp directory. For some programs, some files are used two times a time, they are no longer used, and files like this are placed here. Some Linux systems automatically clean up this directory on a regular basis, so don't put important data here.
/usr
In this directory, you can find additional tools that are not suitable for use in/bin or/etc directories. Like games, some of the print tools pull and so on. The/usr directory contains many subdirectories: The/usr/bin directory is used for storing programs, and/usr/share is used to store some shared data, such as music files or icons, etc./usr/lib directories are used to store those that cannot be run directly, However, it is a function library file that is necessary for many programs to run. Your package Manager (which should be "new") will automatically help you manage the/usr directory.
/opt
Here the main storage of those optional programs. Do you want to try the latest Firefox beta? Put it in the/opt directory, so that when you're done trying to erase Firefox, you can simply delete it without affecting any other settings on the system. The program installed in the/OPT directory, all of its data, library files, etc. are placed under the same directory.
For example: Just installed the beta version of Firefox, can be installed in the/opt/firefox_beta directory, the/opt/firefox_beta directory contains all the files needed to run Firefox, libraries, data and so on. To remove Firefox, you can simply delete the/opt/firefox_beta directory.
/usr/local
The main store is those manually installed software. It has a similar directory structure to the/usr directory. Let the package Manager manage the/usr directory and put the custom script (scripts) under the/usr/local directory.

This article is from the Linux OPS blog, so be sure to keep this source http://zhumy.blog.51cto.com/11647651/1789741

The role of each directory in Linux systems

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.