I've been using Linux for a couple of years now but I still haven't figured out what the origin or meaning of some the directory names are on Unix and Unix like systems. E.g. what does etc
stand for or var
? Where does the opt
name come from?
And while we're on the topic anyway. Can someone give a clear explanation of what directory is best used for what. I sometimes get confused where certain software is installed or what the most appropriate directory is to install software into.
For more data on the layout of Linux file-systems, look at the Filesystem Hierarchy Standard (now at version 2.3, with the beta 3.0 version deployed on most recent distros). It does explain some of where the names came from:
/usr/local/
for reasons I'll get to later./srv/http
would be for static websites,/srv/ftp
for an FTP server./opt vs /usr/local
The rule of thumb I've seen is best described as:
Sorry to resurrect an old thread, but I feel this detail is an important clarification for all future seekers of this info:
/etc stands for etcetera
/usr stands for Unix System Resources(Source)
Historically,
/etc
stands for "etcetera" and/var
is short for "variable." I suppose the former is because a large collection of unrelated system configuration files go into/etc
. The latter is because the files in/var
are expected to change. You can often mount/usr
and/
as read-only (except when performing updates), but you can never mount/var
read-only. It hold system logfiles, lock files, spool files, and other things that change dynamically.Other people gave you pointers to help you figure out what best goes where.
Try this:
The best place to look for this is the Filesystem Hierarchy Standard (FHS). The latest version is 2.3 available at: http://www.pathname.com/fhs/pub/fhs-2.3.html.
/usr
actually means Unix System Resourcessource:: https://wiki.debian.org/FilesystemHierarchyStandard
If you observe several flavours of unix operating system than you will find some what difference in directory names, but most of the common are explain below...
/bin stands for binary (contains binary files and also contains commands mostly used by users. It is also the default path for command execution ).
/sbin ( this contains the special commands which are generally fired by super user)
/lib stands for library (contains shared libraries used by filesystem and for booting, probably used by the executables in bin) /proc stands for processes(if you wanna verify just check this director it will contain several directories named in random numbers, that are nothing but process number you can cross check by ps - ef)
/root means root user.( default directory for root user) /home ( all the non-root users have there home directory under this directory) /dev stands for device (holds special and device files, if you look in this directory via ls - l command major and minor numbers are also shown in this directory also the device type shown at starting of each line in ls - l result. B means block special device, c means character special device ). /tmp stands for temporary.( temporary resources required for some process kept here temporarily ) /mnt stands for mount point (mount a temporary filesystem here). /var stands for variable( it holds variable data, the directory it contains are changing in size every time) /opt stands for optional (generally third party Software are installed in this directory). /usr stands for Unix System Resources.( all the system required resources are placed here) /etc stands for etcetera ( it is also important one, most of the configuration files, user management files, security files and other things are kept under this)