General discussion

  • Creator
    Topic
  • #2181113

    Linux Filesystem explained

    Locked

    by jaqui ·

    there are several differences between windows and linux filesystem structure. these differences are the way linux ( and other unix os ) protect against both data loss and filesystem corruption.

    t begin with a basic terminology definition ( most likely not needed, but included for completeness )

    root is both the system admin, and the foundation of the file system. the differentiation is:
    root = system admin
    / = foundation of file system

    Directory: a folder on a partition. the biggest difference is a directory can be a partition name as well, when this happens accessing the directory is changing drives in windows.

    filesystem type: this is the underlying structure of the filesystem, e2fs, reiserfs…. a windows version is fat, fat32 or ntfs.

    partition: the same as windows, a section of physical hard drive set up to act as a hard drive in and of itself.

    where a directory or partition has an * after it will be where the term is applying to more than one definition.

    now that this is clarified, the linux names and the windows equivalents.

    / this is the same as the c drive with windows.

    /bin this directory is used to store the command line executables that any use can access. comparable to c:\windows\command

    /boot this directory can be, and usually is, a separate partition. this contains the kernel, and those parts of the bootloader that are not able to fit in the mbr ( master boot record )

    /dev this directory is used to store the definitions of all known devices. it is not recommended to make this it’s own partition.
    this is most closely matched to device manager in windows, though this is not a good match, as it also resembles the c:\windows\system folder

    /etc this directory is used to store system configuration data, such as what drivers, default fonts, default interface, default runlevel… are setup for the system. it contains the configuration defaults for every distribution included application. the closest windows has to this is the windows directory itself.

    /home* this is comparable to the c:\documents and settings in windows nt family of products. it is recommended that this be a separate partition

    /lib this is the core shared libraries and kernel modules. again this is the windows\system folder

    /media a directory detailed to be used for removable media, such as floppys and cdroms, this is often not included. my computer in windows

    /mnt this directory is always used, it is intended to hold mount points for filesystems, it is also used for the media mout points mentioned above. my computer in windows.

    /opt* : Add-on application software packages.
    by making this a partition, not just a directory in the / filesystem, you can control the space available for after market applications. unfortunately, this usage has not happened as much as it should have. c:\program files ( need I say more? 😉 )

    /proc this is a depreciated structure, it was used to store active processes. newer systems will no longer have this.

    /root this is the system admin users home directory, locked to root access only. optionally, but not recommended, a separate partition it is comparable to c:\windows

    /sbin this is the root user only executable tools.
    comparable to c:\windows\command

    /srv : Data for services provided by this system
    no real windows equivalent, other than c:\windows

    /tmp : Temporary files, optionally a separate partition. comparable to c:\windows\temp
    I personally do make this a separate partition, as some cd burning software creates temporary disc images in this, and I can ensure enough space for this activity this way.

    /usr this is the area that the actual programs, libraries sources for the kernel… are installed.
    most 3rd party software also installs itself here, despite the existance of the /opt directory / partition. this is c:\program files there is an entire heirarchy under this, that breaks the contents into even smaller areas, the url supplied at the bottom has these details. I always set this as it’s own partition and ensure it is twice the size required for the system ( those 3rd party apps you know. )

    /var optionally it’s own partion, recommended to be so. this is used to store logs, default for webserver root. public ftp mailcap ( email server ) in short to store anything that is changed regularly, and that a record is needed. most closely matched by c:\windows

    and there you have a brief outline of what each of those cryptic directories are for on your linux workstation. this should help you to find your way around, if / when you are troubleshooting a system. ( like finding default font setting for xfs ( x font srever ) )
    all of this, in technical detail, including options can be found here:

    http://www.pathname.com/fhs/pub/fhs-2.3.html

All Comments

  • Author
    Replies
    • #2477405

      yay

      by naughtymonkey ·

      In reply to Linux Filesystem explained

      Make sense 🙂

      [i]just wanted to say this is very helpful[/i]

      :p

      • #2477391

        did you notice

        by jaqui ·

        In reply to yay

        how long this sat here before anyone posted to it? 😀

        over 2 years.

        I’m glad it hits the right note, that is what I intended with it.

        • #2477290

          I only found it…

          by naughtymonkey ·

          In reply to did you notice

          because you had a link in a post but since I am focusing on linux right now I was glad to read it. I wondered what the comparisons were.

        • #2477280

          The comparisons

          by jaqui ·

          In reply to I only found it…

          are just a general approximation, but they do put the differences into the correct perspective.

          yeah, if the tag search was working right, then this may have been found sooner. Though a search in the articles section of the website also brings up an article, with a link to it. 😉

          http://articles.techrepublic.com.com/5100-10877_11-5982893.html

          I know this, because I wrote the article as well. 🙂

      • #2547500

        Linux File System

        by tjay01 ·

        In reply to yay

        Very Important

    • #2477398

      second the YAY…

      by boxfiddler ·

      In reply to Linux Filesystem explained

      not having the time I would like to look into all this stuff and keep moving as quickly as I would like with my transition to Linux! It’s extremely nice to stumble into info like this in my ‘spare’ time!
      Thank you!

      edit typo

      • #2477390

        Hooterville?

        by jaqui ·

        In reply to second the YAY…

        is that really a town?
        [ I wanna move there ]:) ]

        did you notice
        how long this sat here before anyone posted to it? 😀

        over 2 years.

        I’m glad it hits the right note, that is what I intended with it.

        • #2479217

          Hooterville?

          by boxfiddler ·

          In reply to Hooterville?

          Petticoat Junction.
          Green Acres.
          Sam Drucker.
          Uncle Joe.

          Couldn’t think of a better alias…

Viewing 1 reply thread