There are/lib and/usr/lib in the "Turn" Linux, what is the difference between the library files in these two directories? If there's no difference, why put it separately? __linux

Source: Internet
Author: User
There's a difference. The
/lib gives a library file of the root and the kernel required so or a, and/usr/lib is available to ordinary users.
There are two modes of Linux program, which you should know, is User mode and kernel mode, and this is also related to, no longer redundant.

differences between ================/lib and/usr/lib and/usr/local/lib (ZZ) article classification: Operating system

Simply put,/lib is kernel-level,/usr/lib is system-level,/usr/local/lib is user-level.

/lib/-contains a number of library files that are used by programs in/bin/and/sbin/. The directory/usr/lib/contains more library files for user programs. The/lib directory is where the library files required by the program are placed in the/bin and/sbin directories. The name of the file under the/lib directory follows the following format:
Libc.so.*
ld*
A shared library that is used only by a program in the/USR directory does not have to be placed in the/lib directory. Only libraries under/bin and/sbin need to be placed under the/lib directory. In fact, libm.so.* type library files can be placed under/usr/lib if they are needed by/bin and/sbin.

/bin/-is used to store user commands. The directory/usr/bin is also used to store user commands.

/sbin/-the storage location of many system commands, such as shutdown. Many system commands are also included in the directory/usr/sbin.

/root/-the home directory of the root user (Superuser).

/mnt/-This directory typically includes mount points for file systems that are mounted after the system is booted. For example, the default disc mount point is/mnt/cdrom/.

/boot/-includes files used during the kernel and other system startup.

/lost+found/-is used by fsck to place fragmented files (files without names).

/lib/-contains a number of library files that are used by programs in/bin/and/sbin/. The directory/usr/lib/contains more library files for user programs.

/dev/-Storage equipment files.

/etc/-contains a number of configuration files and directories.

/var/-is used to store variable (or constantly changing) files, such as log files and printer spool files.

/usr/-includes files and directories directly related to system users, such as applications and library files that support them.

/proc/-a virtual file system (not actually stored on disk) that includes system information that is used by some programs.

/initrd/-the directory that is used to mount the initrd.img image file when the computer starts up and the directory that loads the required device modules.

Warning

Do not delete the/initrd/directory. If you delete the directory and then reboot Red Hat Linux, you will not be able to boot your computer.

/tmp/-a temporary directory for users and programs. /TMP gives all system users the right to read and write.

/home/-The default location of the user's home directory.

/opt/-A storage directory of optional files and programs. The directory is primarily used by Third-party developers to easily install and uninstall their packages.

Related Article

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.