Difference between /usr and /usr/local
What is the difference between /usr and /usr/local?
Johannes |
Quote:
The /usr directory is generally for applications and related data of interest to the users--as opposed to maybe the system administrator. /usr/local is a subdirectory within that--on my system, it does not have much in it. Much of the filesystem setup traces back to Unix and, for most users, has no practical meaning. Nonetheless, the conventions get followed to make life easier for system admins, developers, etc. Go to tldp.org and look for the "Filesystem Hierarchy Standard" |
The /usr directory contains its own hierarchy which is similar to the root hierarchy. The /bin and /sbin directories will contain the basic commands needed to boot, run and administer the machine. When you add a package, it usually will install under the /usr hierarchy. Suppose that you want to compile your own software. It isn't something that is provided by the distro, and you would like to protect it from being altered during an upgrade or reinstall. The /usr/local hierarchy won't be touched by the distro.
Many tarballed packages will use /usr however. Often /usr/local/bin isn't added to the PATH. In a heterogeneous network, where each host runs the same Linux distro, you might have have /bin, /sbin/, /lib, /usr, /opt and other directories mounted read-only. Instead of a local partition, an NFS share is mounted. In such an environment, the /usr/local directory may have a local partition mounted to allow you to install software with the base directory of /usr/local. If you take any source package using autoconf, and run ./configure --help, you will see this option: Code:
Installation directories: |
All times are GMT -5. The time now is 08:55 PM. |