Meaning of directories on Unix and Unix like systemsWhat are the best practices of the usr, var, and etc...

Is there any relevance to Thor getting his hair cut other than comedic value?

How do ISS astronauts "get their stripes"?

I encountered my boss during an on-site interview at another company. Should I bring it up when seeing him next time?

How to approximate rolls for potions of healing using only d6's?

How to avoid being sexist when trying to employ someone to function in a very sexist environment?

What is this waxed root vegetable?

What is the difference between throw e and throw new Exception(e)?

Why does Starman/Roadster have radial acceleration?

Sometimes a banana is just a banana

If nine coins are tossed, what is the probability that the number of heads is even?

Where is this triangular-shaped space station from?

Must a tritone substitution use a dominant seventh chord?

What can I substitute for soda pop in a sweet pork recipe?

Hacker Rank: Array left rotation

The change directory (cd) command is not working with a USB drive

How can I find an Adventure or Adventure Path I need that meets certain criteria?

Is there a better way to make addon working on both blender 2.80 and 2.79?

How to deny access to SQL Server to certain login over SSMS, but allow over .Net SqlClient Data Provider

Called into a meeting and told we are being made redundant (laid off) and "not to share outside". Can I tell my partner?

How do I implement simple JS code to deploy a compiled smart contract to ganache-cli?

Why might Google Analytics report a sudden, but persistent, drop in bounce rate (70% to 12%)

How to mitigate "bandwagon attacking" from players?

It took me a lot of time to make this, pls like. (YouTube Comments #1)

What if I store 10TB on azure servers and then keep the vm powered off?



Meaning of directories on Unix and Unix like systems


What are the best practices of the usr, var, and etc folders?Linux - What do the common root folder names mean?What are the standard Linux directories?“/usr”, “/usr/local/”, “/sbin”is this unix /var/blay/blah some kind of example convention?What is the difference between double and single square brackets in bash?Environment variables of a running process on Unix?How to get current Unix time in milliseconds in bash?Unix systems restarting on it's ownNginx and unix user directoriesCan scp copy directories recursively?How do you reallocate hard drive space between directories in Unix FreeBSD?unix ssh block ipaddressIs cURL standard part of all Unix-like operating systems?How to change naming of core dumps in unix-like operating systems?













99















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.










share|improve this question

























  • Funny thing unix being a parody of multics and being the one to survive... I guess multics was just way ahead of it's time.

    – SparK
    Aug 17 '18 at 13:33
















99















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.










share|improve this question

























  • Funny thing unix being a parody of multics and being the one to survive... I guess multics was just way ahead of it's time.

    – SparK
    Aug 17 '18 at 13:33














99












99








99


61






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.










share|improve this question
















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.







linux unix directory






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Jun 12 '09 at 9:25







Luke

















asked Jun 12 '09 at 5:11









LukeLuke

1,66952835




1,66952835













  • Funny thing unix being a parody of multics and being the one to survive... I guess multics was just way ahead of it's time.

    – SparK
    Aug 17 '18 at 13:33



















  • Funny thing unix being a parody of multics and being the one to survive... I guess multics was just way ahead of it's time.

    – SparK
    Aug 17 '18 at 13:33

















Funny thing unix being a parody of multics and being the one to survive... I guess multics was just way ahead of it's time.

– SparK
Aug 17 '18 at 13:33





Funny thing unix being a parody of multics and being the one to survive... I guess multics was just way ahead of it's time.

– SparK
Aug 17 '18 at 13:33










7 Answers
7






active

oldest

votes


















118














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:





  • /bin - Binaries.


  • /boot - Files required for booting.


  • /dev - Device files.


  • /etc - Et cetera. The name is inherited from the earliest Unixes, which is when it became the spot to put config-files.


  • /home - Where home directories are kept.


  • /lib - Where code libraries are kept.


  • /media - A more modern directory, but where removable media gets mounted.


  • /mnt - Where temporary file-systems are mounted.


  • /opt - Where optional add-on software is installed. This is discrete from /usr/local/ for reasons I'll get to later.


  • /run - Where runtime variable data is kept.


  • /sbin - Where super-binaries are stored. These usually only work with root.


  • /srv - Stands for "serve". This directory is intended for static files that are served out. /srv/http would be for static websites, /srv/ftp for an FTP server.


  • /tmp - Where temporary files may be stored.


  • /usr - Another directory inherited from the Unixes of old, it stands for "UNIX System Resources". It does not stand for "user" (see the Debian Wiki). This directory should be sharable between hosts, and can be NFS mounted to multiple hosts safely. It can be mounted read-only safely.


  • /var - Another directory inherited from the Unixes of old, it stands for "variable". This is where system data that varies may be stored. Such things as spool and cache directories may be located here. If a program needs to write to the local file-system and isn't serving that data to someone directly, it'll go here.


/opt vs /usr/local



The rule of thumb I've seen is best described as:




Use /usr/local for things that would normally go into /usr, or are overriding things that are already in /usr. Use /opt for things that install all in one directory, or are otherwise special.







share|improve this answer





















  • 2





    The document answers the first half of my question very well. However, where the names are derived from is still a mystery. The reason I'd like to know is because I think it will give me more context.

    – Luke
    Jun 12 '09 at 9:31











  • The naming is nearly all self explanatory. Especially if you read through the descriptions in that link.

    – Dan Carley
    Jun 12 '09 at 9:35






  • 3





    No it isn't. It explains what 'etc' is used for but is doesn't explain where the name comes from or what it stands for.

    – Luke
    Jun 12 '09 at 21:18











  • @sysadmin1138, so /run is basically referencing the RAM?

    – Pacerier
    Dec 19 '14 at 5:59













  • @Pacerier It's a filesystem, but may be safely mounted as a RAM-disk. That said, many programs assume a set structure in there, so actually require persistence.

    – sysadmin1138
    Dec 19 '14 at 12:37



















21














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.






share|improve this answer































    21














    Sorry to resurrect an old thread, but I feel this detail is an important clarification for all future seekers of this info:





    • /opt stands for optional (as in optional add-on packages).


    • /bin stands for binary (contains executables used by the OS).


    • /lib stands for library (contains shared libraries used by filesystem and for booting, probably used by the executables in bin)


    • /proc stands for processes.


    • /root means root user.


    • /home holds the home sub-directories for any non-root users.


    • /dev stands for device (holds special and device files).


    • /tmp stands for temporary.


    • /srv stands for serve.


    • /mnt stands for mount point (mount a temporary filesystem here).


    • /include contains #include files, i.e. header files (e.g., stdio.h).


    • /var stands for variable

    • /etc stands for etcetera


    • /usr stands for Unix System Resources(Source)







    share|improve this answer


























    • Nice answer: succinct, directed at the level of the question, and no need to look up other links. +1

      – Scott Biggs
      Jul 28 '14 at 13:37











    • I haven't seen srv before. I prefer convention over configuration, so long as it makes sense and is enforced. Obviously, Apache doesn't always serve files from the /srv directory.

      – user148298
      Sep 11 '18 at 13:34



















    17














    Try this:



    $ man hier





    share|improve this answer



















    • 1





      Nice one. However, just like the document referred to in other answers, this man page only talks about what the directories are used for. I'm also interested in why certain names where chosen, like /etc e.g.

      – Luke
      Jun 23 '09 at 22:33






    • 2





      The answer to your question about /etc is here: en.wikipedia.org/wiki/Filesystem_Hierarchy_Standard

      – Anonymous
      Jun 24 '09 at 12:37



















    5














    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.






    share|improve this answer































      2














      /usr actually means Unix System Resources



      source:: https://wiki.debian.org/FilesystemHierarchyStandard






      share|improve this answer

































        1














        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)






        share|improve this answer























          Your Answer








          StackExchange.ready(function() {
          var channelOptions = {
          tags: "".split(" "),
          id: "2"
          };
          initTagRenderer("".split(" "), "".split(" "), channelOptions);

          StackExchange.using("externalEditor", function() {
          // Have to fire editor after snippets, if snippets enabled
          if (StackExchange.settings.snippets.snippetsEnabled) {
          StackExchange.using("snippets", function() {
          createEditor();
          });
          }
          else {
          createEditor();
          }
          });

          function createEditor() {
          StackExchange.prepareEditor({
          heartbeatType: 'answer',
          autoActivateHeartbeat: false,
          convertImagesToLinks: true,
          noModals: true,
          showLowRepImageUploadWarning: true,
          reputationToPostImages: 10,
          bindNavPrevention: true,
          postfix: "",
          imageUploader: {
          brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
          contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
          allowUrls: true
          },
          onDemand: true,
          discardSelector: ".discard-answer"
          ,immediatelyShowMarkdownHelp:true
          });


          }
          });














          draft saved

          draft discarded


















          StackExchange.ready(
          function () {
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fserverfault.com%2fquestions%2f24523%2fmeaning-of-directories-on-unix-and-unix-like-systems%23new-answer', 'question_page');
          }
          );

          Post as a guest















          Required, but never shown

























          7 Answers
          7






          active

          oldest

          votes








          7 Answers
          7






          active

          oldest

          votes









          active

          oldest

          votes






          active

          oldest

          votes









          118














          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:





          • /bin - Binaries.


          • /boot - Files required for booting.


          • /dev - Device files.


          • /etc - Et cetera. The name is inherited from the earliest Unixes, which is when it became the spot to put config-files.


          • /home - Where home directories are kept.


          • /lib - Where code libraries are kept.


          • /media - A more modern directory, but where removable media gets mounted.


          • /mnt - Where temporary file-systems are mounted.


          • /opt - Where optional add-on software is installed. This is discrete from /usr/local/ for reasons I'll get to later.


          • /run - Where runtime variable data is kept.


          • /sbin - Where super-binaries are stored. These usually only work with root.


          • /srv - Stands for "serve". This directory is intended for static files that are served out. /srv/http would be for static websites, /srv/ftp for an FTP server.


          • /tmp - Where temporary files may be stored.


          • /usr - Another directory inherited from the Unixes of old, it stands for "UNIX System Resources". It does not stand for "user" (see the Debian Wiki). This directory should be sharable between hosts, and can be NFS mounted to multiple hosts safely. It can be mounted read-only safely.


          • /var - Another directory inherited from the Unixes of old, it stands for "variable". This is where system data that varies may be stored. Such things as spool and cache directories may be located here. If a program needs to write to the local file-system and isn't serving that data to someone directly, it'll go here.


          /opt vs /usr/local



          The rule of thumb I've seen is best described as:




          Use /usr/local for things that would normally go into /usr, or are overriding things that are already in /usr. Use /opt for things that install all in one directory, or are otherwise special.







          share|improve this answer





















          • 2





            The document answers the first half of my question very well. However, where the names are derived from is still a mystery. The reason I'd like to know is because I think it will give me more context.

            – Luke
            Jun 12 '09 at 9:31











          • The naming is nearly all self explanatory. Especially if you read through the descriptions in that link.

            – Dan Carley
            Jun 12 '09 at 9:35






          • 3





            No it isn't. It explains what 'etc' is used for but is doesn't explain where the name comes from or what it stands for.

            – Luke
            Jun 12 '09 at 21:18











          • @sysadmin1138, so /run is basically referencing the RAM?

            – Pacerier
            Dec 19 '14 at 5:59













          • @Pacerier It's a filesystem, but may be safely mounted as a RAM-disk. That said, many programs assume a set structure in there, so actually require persistence.

            – sysadmin1138
            Dec 19 '14 at 12:37
















          118














          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:





          • /bin - Binaries.


          • /boot - Files required for booting.


          • /dev - Device files.


          • /etc - Et cetera. The name is inherited from the earliest Unixes, which is when it became the spot to put config-files.


          • /home - Where home directories are kept.


          • /lib - Where code libraries are kept.


          • /media - A more modern directory, but where removable media gets mounted.


          • /mnt - Where temporary file-systems are mounted.


          • /opt - Where optional add-on software is installed. This is discrete from /usr/local/ for reasons I'll get to later.


          • /run - Where runtime variable data is kept.


          • /sbin - Where super-binaries are stored. These usually only work with root.


          • /srv - Stands for "serve". This directory is intended for static files that are served out. /srv/http would be for static websites, /srv/ftp for an FTP server.


          • /tmp - Where temporary files may be stored.


          • /usr - Another directory inherited from the Unixes of old, it stands for "UNIX System Resources". It does not stand for "user" (see the Debian Wiki). This directory should be sharable between hosts, and can be NFS mounted to multiple hosts safely. It can be mounted read-only safely.


          • /var - Another directory inherited from the Unixes of old, it stands for "variable". This is where system data that varies may be stored. Such things as spool and cache directories may be located here. If a program needs to write to the local file-system and isn't serving that data to someone directly, it'll go here.


          /opt vs /usr/local



          The rule of thumb I've seen is best described as:




          Use /usr/local for things that would normally go into /usr, or are overriding things that are already in /usr. Use /opt for things that install all in one directory, or are otherwise special.







          share|improve this answer





















          • 2





            The document answers the first half of my question very well. However, where the names are derived from is still a mystery. The reason I'd like to know is because I think it will give me more context.

            – Luke
            Jun 12 '09 at 9:31











          • The naming is nearly all self explanatory. Especially if you read through the descriptions in that link.

            – Dan Carley
            Jun 12 '09 at 9:35






          • 3





            No it isn't. It explains what 'etc' is used for but is doesn't explain where the name comes from or what it stands for.

            – Luke
            Jun 12 '09 at 21:18











          • @sysadmin1138, so /run is basically referencing the RAM?

            – Pacerier
            Dec 19 '14 at 5:59













          • @Pacerier It's a filesystem, but may be safely mounted as a RAM-disk. That said, many programs assume a set structure in there, so actually require persistence.

            – sysadmin1138
            Dec 19 '14 at 12:37














          118












          118








          118







          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:





          • /bin - Binaries.


          • /boot - Files required for booting.


          • /dev - Device files.


          • /etc - Et cetera. The name is inherited from the earliest Unixes, which is when it became the spot to put config-files.


          • /home - Where home directories are kept.


          • /lib - Where code libraries are kept.


          • /media - A more modern directory, but where removable media gets mounted.


          • /mnt - Where temporary file-systems are mounted.


          • /opt - Where optional add-on software is installed. This is discrete from /usr/local/ for reasons I'll get to later.


          • /run - Where runtime variable data is kept.


          • /sbin - Where super-binaries are stored. These usually only work with root.


          • /srv - Stands for "serve". This directory is intended for static files that are served out. /srv/http would be for static websites, /srv/ftp for an FTP server.


          • /tmp - Where temporary files may be stored.


          • /usr - Another directory inherited from the Unixes of old, it stands for "UNIX System Resources". It does not stand for "user" (see the Debian Wiki). This directory should be sharable between hosts, and can be NFS mounted to multiple hosts safely. It can be mounted read-only safely.


          • /var - Another directory inherited from the Unixes of old, it stands for "variable". This is where system data that varies may be stored. Such things as spool and cache directories may be located here. If a program needs to write to the local file-system and isn't serving that data to someone directly, it'll go here.


          /opt vs /usr/local



          The rule of thumb I've seen is best described as:




          Use /usr/local for things that would normally go into /usr, or are overriding things that are already in /usr. Use /opt for things that install all in one directory, or are otherwise special.







          share|improve this answer















          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:





          • /bin - Binaries.


          • /boot - Files required for booting.


          • /dev - Device files.


          • /etc - Et cetera. The name is inherited from the earliest Unixes, which is when it became the spot to put config-files.


          • /home - Where home directories are kept.


          • /lib - Where code libraries are kept.


          • /media - A more modern directory, but where removable media gets mounted.


          • /mnt - Where temporary file-systems are mounted.


          • /opt - Where optional add-on software is installed. This is discrete from /usr/local/ for reasons I'll get to later.


          • /run - Where runtime variable data is kept.


          • /sbin - Where super-binaries are stored. These usually only work with root.


          • /srv - Stands for "serve". This directory is intended for static files that are served out. /srv/http would be for static websites, /srv/ftp for an FTP server.


          • /tmp - Where temporary files may be stored.


          • /usr - Another directory inherited from the Unixes of old, it stands for "UNIX System Resources". It does not stand for "user" (see the Debian Wiki). This directory should be sharable between hosts, and can be NFS mounted to multiple hosts safely. It can be mounted read-only safely.


          • /var - Another directory inherited from the Unixes of old, it stands for "variable". This is where system data that varies may be stored. Such things as spool and cache directories may be located here. If a program needs to write to the local file-system and isn't serving that data to someone directly, it'll go here.


          /opt vs /usr/local



          The rule of thumb I've seen is best described as:




          Use /usr/local for things that would normally go into /usr, or are overriding things that are already in /usr. Use /opt for things that install all in one directory, or are otherwise special.








          share|improve this answer














          share|improve this answer



          share|improve this answer








          edited 5 hours ago









          Tim Parenti

          1056




          1056










          answered Jun 12 '09 at 5:16









          sysadmin1138sysadmin1138

          117k17145280




          117k17145280








          • 2





            The document answers the first half of my question very well. However, where the names are derived from is still a mystery. The reason I'd like to know is because I think it will give me more context.

            – Luke
            Jun 12 '09 at 9:31











          • The naming is nearly all self explanatory. Especially if you read through the descriptions in that link.

            – Dan Carley
            Jun 12 '09 at 9:35






          • 3





            No it isn't. It explains what 'etc' is used for but is doesn't explain where the name comes from or what it stands for.

            – Luke
            Jun 12 '09 at 21:18











          • @sysadmin1138, so /run is basically referencing the RAM?

            – Pacerier
            Dec 19 '14 at 5:59













          • @Pacerier It's a filesystem, but may be safely mounted as a RAM-disk. That said, many programs assume a set structure in there, so actually require persistence.

            – sysadmin1138
            Dec 19 '14 at 12:37














          • 2





            The document answers the first half of my question very well. However, where the names are derived from is still a mystery. The reason I'd like to know is because I think it will give me more context.

            – Luke
            Jun 12 '09 at 9:31











          • The naming is nearly all self explanatory. Especially if you read through the descriptions in that link.

            – Dan Carley
            Jun 12 '09 at 9:35






          • 3





            No it isn't. It explains what 'etc' is used for but is doesn't explain where the name comes from or what it stands for.

            – Luke
            Jun 12 '09 at 21:18











          • @sysadmin1138, so /run is basically referencing the RAM?

            – Pacerier
            Dec 19 '14 at 5:59













          • @Pacerier It's a filesystem, but may be safely mounted as a RAM-disk. That said, many programs assume a set structure in there, so actually require persistence.

            – sysadmin1138
            Dec 19 '14 at 12:37








          2




          2





          The document answers the first half of my question very well. However, where the names are derived from is still a mystery. The reason I'd like to know is because I think it will give me more context.

          – Luke
          Jun 12 '09 at 9:31





          The document answers the first half of my question very well. However, where the names are derived from is still a mystery. The reason I'd like to know is because I think it will give me more context.

          – Luke
          Jun 12 '09 at 9:31













          The naming is nearly all self explanatory. Especially if you read through the descriptions in that link.

          – Dan Carley
          Jun 12 '09 at 9:35





          The naming is nearly all self explanatory. Especially if you read through the descriptions in that link.

          – Dan Carley
          Jun 12 '09 at 9:35




          3




          3





          No it isn't. It explains what 'etc' is used for but is doesn't explain where the name comes from or what it stands for.

          – Luke
          Jun 12 '09 at 21:18





          No it isn't. It explains what 'etc' is used for but is doesn't explain where the name comes from or what it stands for.

          – Luke
          Jun 12 '09 at 21:18













          @sysadmin1138, so /run is basically referencing the RAM?

          – Pacerier
          Dec 19 '14 at 5:59







          @sysadmin1138, so /run is basically referencing the RAM?

          – Pacerier
          Dec 19 '14 at 5:59















          @Pacerier It's a filesystem, but may be safely mounted as a RAM-disk. That said, many programs assume a set structure in there, so actually require persistence.

          – sysadmin1138
          Dec 19 '14 at 12:37





          @Pacerier It's a filesystem, but may be safely mounted as a RAM-disk. That said, many programs assume a set structure in there, so actually require persistence.

          – sysadmin1138
          Dec 19 '14 at 12:37













          21














          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.






          share|improve this answer




























            21














            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.






            share|improve this answer


























              21












              21








              21







              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.






              share|improve this answer













              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.







              share|improve this answer












              share|improve this answer



              share|improve this answer










              answered Jun 12 '09 at 5:29









              EddieEddie

              9,29773146




              9,29773146























                  21














                  Sorry to resurrect an old thread, but I feel this detail is an important clarification for all future seekers of this info:





                  • /opt stands for optional (as in optional add-on packages).


                  • /bin stands for binary (contains executables used by the OS).


                  • /lib stands for library (contains shared libraries used by filesystem and for booting, probably used by the executables in bin)


                  • /proc stands for processes.


                  • /root means root user.


                  • /home holds the home sub-directories for any non-root users.


                  • /dev stands for device (holds special and device files).


                  • /tmp stands for temporary.


                  • /srv stands for serve.


                  • /mnt stands for mount point (mount a temporary filesystem here).


                  • /include contains #include files, i.e. header files (e.g., stdio.h).


                  • /var stands for variable

                  • /etc stands for etcetera


                  • /usr stands for Unix System Resources(Source)







                  share|improve this answer


























                  • Nice answer: succinct, directed at the level of the question, and no need to look up other links. +1

                    – Scott Biggs
                    Jul 28 '14 at 13:37











                  • I haven't seen srv before. I prefer convention over configuration, so long as it makes sense and is enforced. Obviously, Apache doesn't always serve files from the /srv directory.

                    – user148298
                    Sep 11 '18 at 13:34
















                  21














                  Sorry to resurrect an old thread, but I feel this detail is an important clarification for all future seekers of this info:





                  • /opt stands for optional (as in optional add-on packages).


                  • /bin stands for binary (contains executables used by the OS).


                  • /lib stands for library (contains shared libraries used by filesystem and for booting, probably used by the executables in bin)


                  • /proc stands for processes.


                  • /root means root user.


                  • /home holds the home sub-directories for any non-root users.


                  • /dev stands for device (holds special and device files).


                  • /tmp stands for temporary.


                  • /srv stands for serve.


                  • /mnt stands for mount point (mount a temporary filesystem here).


                  • /include contains #include files, i.e. header files (e.g., stdio.h).


                  • /var stands for variable

                  • /etc stands for etcetera


                  • /usr stands for Unix System Resources(Source)







                  share|improve this answer


























                  • Nice answer: succinct, directed at the level of the question, and no need to look up other links. +1

                    – Scott Biggs
                    Jul 28 '14 at 13:37











                  • I haven't seen srv before. I prefer convention over configuration, so long as it makes sense and is enforced. Obviously, Apache doesn't always serve files from the /srv directory.

                    – user148298
                    Sep 11 '18 at 13:34














                  21












                  21








                  21







                  Sorry to resurrect an old thread, but I feel this detail is an important clarification for all future seekers of this info:





                  • /opt stands for optional (as in optional add-on packages).


                  • /bin stands for binary (contains executables used by the OS).


                  • /lib stands for library (contains shared libraries used by filesystem and for booting, probably used by the executables in bin)


                  • /proc stands for processes.


                  • /root means root user.


                  • /home holds the home sub-directories for any non-root users.


                  • /dev stands for device (holds special and device files).


                  • /tmp stands for temporary.


                  • /srv stands for serve.


                  • /mnt stands for mount point (mount a temporary filesystem here).


                  • /include contains #include files, i.e. header files (e.g., stdio.h).


                  • /var stands for variable

                  • /etc stands for etcetera


                  • /usr stands for Unix System Resources(Source)







                  share|improve this answer















                  Sorry to resurrect an old thread, but I feel this detail is an important clarification for all future seekers of this info:





                  • /opt stands for optional (as in optional add-on packages).


                  • /bin stands for binary (contains executables used by the OS).


                  • /lib stands for library (contains shared libraries used by filesystem and for booting, probably used by the executables in bin)


                  • /proc stands for processes.


                  • /root means root user.


                  • /home holds the home sub-directories for any non-root users.


                  • /dev stands for device (holds special and device files).


                  • /tmp stands for temporary.


                  • /srv stands for serve.


                  • /mnt stands for mount point (mount a temporary filesystem here).


                  • /include contains #include files, i.e. header files (e.g., stdio.h).


                  • /var stands for variable

                  • /etc stands for etcetera


                  • /usr stands for Unix System Resources(Source)








                  share|improve this answer














                  share|improve this answer



                  share|improve this answer








                  edited Feb 4 '17 at 18:25









                  prado

                  150113




                  150113










                  answered Jun 5 '13 at 17:13









                  MikeMike

                  31122




                  31122













                  • Nice answer: succinct, directed at the level of the question, and no need to look up other links. +1

                    – Scott Biggs
                    Jul 28 '14 at 13:37











                  • I haven't seen srv before. I prefer convention over configuration, so long as it makes sense and is enforced. Obviously, Apache doesn't always serve files from the /srv directory.

                    – user148298
                    Sep 11 '18 at 13:34



















                  • Nice answer: succinct, directed at the level of the question, and no need to look up other links. +1

                    – Scott Biggs
                    Jul 28 '14 at 13:37











                  • I haven't seen srv before. I prefer convention over configuration, so long as it makes sense and is enforced. Obviously, Apache doesn't always serve files from the /srv directory.

                    – user148298
                    Sep 11 '18 at 13:34

















                  Nice answer: succinct, directed at the level of the question, and no need to look up other links. +1

                  – Scott Biggs
                  Jul 28 '14 at 13:37





                  Nice answer: succinct, directed at the level of the question, and no need to look up other links. +1

                  – Scott Biggs
                  Jul 28 '14 at 13:37













                  I haven't seen srv before. I prefer convention over configuration, so long as it makes sense and is enforced. Obviously, Apache doesn't always serve files from the /srv directory.

                  – user148298
                  Sep 11 '18 at 13:34





                  I haven't seen srv before. I prefer convention over configuration, so long as it makes sense and is enforced. Obviously, Apache doesn't always serve files from the /srv directory.

                  – user148298
                  Sep 11 '18 at 13:34











                  17














                  Try this:



                  $ man hier





                  share|improve this answer



















                  • 1





                    Nice one. However, just like the document referred to in other answers, this man page only talks about what the directories are used for. I'm also interested in why certain names where chosen, like /etc e.g.

                    – Luke
                    Jun 23 '09 at 22:33






                  • 2





                    The answer to your question about /etc is here: en.wikipedia.org/wiki/Filesystem_Hierarchy_Standard

                    – Anonymous
                    Jun 24 '09 at 12:37
















                  17














                  Try this:



                  $ man hier





                  share|improve this answer



















                  • 1





                    Nice one. However, just like the document referred to in other answers, this man page only talks about what the directories are used for. I'm also interested in why certain names where chosen, like /etc e.g.

                    – Luke
                    Jun 23 '09 at 22:33






                  • 2





                    The answer to your question about /etc is here: en.wikipedia.org/wiki/Filesystem_Hierarchy_Standard

                    – Anonymous
                    Jun 24 '09 at 12:37














                  17












                  17








                  17







                  Try this:



                  $ man hier





                  share|improve this answer













                  Try this:



                  $ man hier






                  share|improve this answer












                  share|improve this answer



                  share|improve this answer










                  answered Jun 23 '09 at 18:18









                  AnonymousAnonymous

                  1,15311217




                  1,15311217








                  • 1





                    Nice one. However, just like the document referred to in other answers, this man page only talks about what the directories are used for. I'm also interested in why certain names where chosen, like /etc e.g.

                    – Luke
                    Jun 23 '09 at 22:33






                  • 2





                    The answer to your question about /etc is here: en.wikipedia.org/wiki/Filesystem_Hierarchy_Standard

                    – Anonymous
                    Jun 24 '09 at 12:37














                  • 1





                    Nice one. However, just like the document referred to in other answers, this man page only talks about what the directories are used for. I'm also interested in why certain names where chosen, like /etc e.g.

                    – Luke
                    Jun 23 '09 at 22:33






                  • 2





                    The answer to your question about /etc is here: en.wikipedia.org/wiki/Filesystem_Hierarchy_Standard

                    – Anonymous
                    Jun 24 '09 at 12:37








                  1




                  1





                  Nice one. However, just like the document referred to in other answers, this man page only talks about what the directories are used for. I'm also interested in why certain names where chosen, like /etc e.g.

                  – Luke
                  Jun 23 '09 at 22:33





                  Nice one. However, just like the document referred to in other answers, this man page only talks about what the directories are used for. I'm also interested in why certain names where chosen, like /etc e.g.

                  – Luke
                  Jun 23 '09 at 22:33




                  2




                  2





                  The answer to your question about /etc is here: en.wikipedia.org/wiki/Filesystem_Hierarchy_Standard

                  – Anonymous
                  Jun 24 '09 at 12:37





                  The answer to your question about /etc is here: en.wikipedia.org/wiki/Filesystem_Hierarchy_Standard

                  – Anonymous
                  Jun 24 '09 at 12:37











                  5














                  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.






                  share|improve this answer




























                    5














                    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.






                    share|improve this answer


























                      5












                      5








                      5







                      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.






                      share|improve this answer













                      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.







                      share|improve this answer












                      share|improve this answer



                      share|improve this answer










                      answered Jun 12 '09 at 5:16









                      JoeJoe

                      1,2851915




                      1,2851915























                          2














                          /usr actually means Unix System Resources



                          source:: https://wiki.debian.org/FilesystemHierarchyStandard






                          share|improve this answer






























                            2














                            /usr actually means Unix System Resources



                            source:: https://wiki.debian.org/FilesystemHierarchyStandard






                            share|improve this answer




























                              2












                              2








                              2







                              /usr actually means Unix System Resources



                              source:: https://wiki.debian.org/FilesystemHierarchyStandard






                              share|improve this answer















                              /usr actually means Unix System Resources



                              source:: https://wiki.debian.org/FilesystemHierarchyStandard







                              share|improve this answer














                              share|improve this answer



                              share|improve this answer








                              edited May 17 '16 at 18:16

























                              answered May 17 '16 at 17:58









                              pradoprado

                              150113




                              150113























                                  1














                                  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)






                                  share|improve this answer




























                                    1














                                    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)






                                    share|improve this answer


























                                      1












                                      1








                                      1







                                      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)






                                      share|improve this answer













                                      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)







                                      share|improve this answer












                                      share|improve this answer



                                      share|improve this answer










                                      answered Nov 21 '17 at 6:57









                                      Anwar khanAnwar khan

                                      112




                                      112






























                                          draft saved

                                          draft discarded




















































                                          Thanks for contributing an answer to Server Fault!


                                          • Please be sure to answer the question. Provide details and share your research!

                                          But avoid



                                          • Asking for help, clarification, or responding to other answers.

                                          • Making statements based on opinion; back them up with references or personal experience.


                                          To learn more, see our tips on writing great answers.




                                          draft saved


                                          draft discarded














                                          StackExchange.ready(
                                          function () {
                                          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fserverfault.com%2fquestions%2f24523%2fmeaning-of-directories-on-unix-and-unix-like-systems%23new-answer', 'question_page');
                                          }
                                          );

                                          Post as a guest















                                          Required, but never shown





















































                                          Required, but never shown














                                          Required, but never shown












                                          Required, but never shown







                                          Required, but never shown

































                                          Required, but never shown














                                          Required, but never shown












                                          Required, but never shown







                                          Required, but never shown







                                          Popular posts from this blog

                                          As a Security Precaution, the user account has been locked The Next CEO of Stack OverflowMS...

                                          Список ссавців Італії Природоохоронні статуси | Список |...

                                          Українські прізвища Зміст Історичні відомості |...