Some analysis of Linux system directory/bin/sbin/usr/bin/usr/sbin and/lib/usrlib

Source: Internet
Author: User

is actually the equivalent of reproduced.

/bin,/sbin,/usr/sbin,/usr/bin Directory

These directories are stored as commands, first distinguishing between/sbin and/bin:

From the command function, the commands under/sbin belong to basic system commands, such as Shutdown,reboot, which are used to start the system, repair the system,/bin to store some common basic commands, such as Ls,chmod, which are often used in the configuration file scripts in the Linux system.

From the point of view of user rights, commands under the/sbin directory are usually only available to administrators, and can be used by command administrators and general users under/bin.

From a running time perspective, the/sbin,/bin can be used before mounting other file systems.

The difference between the/usr/bin,/usr/sbin and the/sbin/bin directory is that:

The/bin,/sbin directory is mounted to the root file system after the system is booted, so the/sbin,/bin directory must be in the same partition as the root file system;

/usr/bin,usr/sbin can and the root file system are not in one partition.

Some non-mandatory system commands stored by/usr/sbin;/usr/bin store Some user commands, such as LEDs (which control LED lights).

Turn off a Netizen's interpretation, personally think the interpretation is in place:

/bin are some of the instructions of the system. The bin for binary shorthand mainly places some of the system's necessary execution files such as: Cat, CP, chmod DF, DMESG, gzip, kill, LS, mkdir, more, Mount, RM, Su, tar, etc.
/sbin is generally referred to as Superuser instructions . There are some prerequisites for system management such as: Cfdisk, dhcpcd, Dump, E2FSCK, Fdisk, Halt, Ifconfig, Ifup, Ifdown, Init, Insmod, Lilo, Lsmod, MKE2FS , Modprobe, Quotacheck, reboot, Rmmod, RunLevel, shutdown and so on.
/usr/bin is a running script for some of the software you install later. Some of the essential executable files for application software tools such as C + +, g++, GCC, Chdrv, diff, Dig, Du, eject, elm, free, gnome*, gzip, htpasswd, KFM, Ktop, last, less, Locale, M4, make, man, Mcopy, NcFTP, newaliases, nslookup passwd, quota, smb*, wget, etc.

/usr/sbin Places some user-installed prerequisites for system administration such as: DHCPD, HTTPD, IMAP, IN.*D, inetd, LPD, named, Netconfig, NMBD, Samba, SendMail, Squid, swap, TCPD, tcpdump and so on.
If the newly installed system, run some very normal such as: shutdown,fdisk command, blatant hint: Bash:command not found. So
The first thing to consider is whether these environment variables are already included in Root $path.
You can view PATH, if: path= $PATH: $HOME/bin need to be added as follows:
Path= $PATH: $HOME/bin:/sbin:/usr/bin:/usr/sbin

The relationship of/lib/usr/lib/usr/local/lib

There's a difference. /lib is given a library file such as root and kernel required so or a, and/usr/lib is available to ordinary users. Linux program has two modes, this you should know, is the user mode and kernel mode, and this is also related, no longer redundant.

================

The difference between/lib and/usr/lib and/usr/local/lib (ZZ) article Category: Operating system

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

/lib/ -contains many 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 placed under the/bin and/sbin directories required by the program's library files. The name of the file under the/lib directory follows the following format:
Libc.so.*
ld*
Only shared libraries that are used by programs in the/USR directory do not have to be placed in the/lib directory. Only the libraries required for the programs under/bin and/sbin need to be placed in the/lib directory. In fact, libm.so.*-type library files can be placed under/usr/lib if they are required by/bin and/sbin.

  • /bin/ -Used to store user commands. 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 system boot. For example, the default CD mount point is /mnt/cdrom/.

  • /boot/ -includes files used during boot of the kernel and other systems.

  • /lost+found/ -Used by fsck to place scattered files (files with no names).

  • /lib/ -contains many 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 many configuration files and directories.

  • /var/ -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), which 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 to load 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/ -Temporary directory for users and programs. / tmp gives all system users read and write rights.

  • /home/ -The default location for the user home directory.

  • /opt/ -The storage directory for optional files and programs. This directory is primarily used by third-party developers to easily install and uninstall their packages.

references:http://blog.csdn.net/fengyunjh/article/details/6232894http://blog.csdn.net/kkdelta/article/details/7708250

Some analysis of the Linux system catalog/bin/sbin/usr/bin/usr/sbin and/lib/usrlib

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.