Hey, I’ve recently designed a Poster about the FHS since I often forget where I should place or find things. Do you have any feedback how to make it better?

I updated the poster: https://whimsical.com/fhs-L6iL5t8kBtCFzAQywZyP4X use the link to see online.

Dark mode

Old version

  • Admax@lemmy.world
    link
    fedilink
    arrow-up
    30
    ·
    1 year ago

    Damn that’s some great work ! When I started linux I wish I had found such ressources, I was really curious what each of these directories were for.

    Would you mind if your material was reused (with credit) for education purposes ?

    • callcc@lemmy.worldOP
      link
      fedilink
      arrow-up
      22
      ·
      1 year ago

      I’d be more than happy if this was used. Do whatever you want with it as long as you abide by the CC BY-SA-4.0 license. This means you can share freely and modify as long as you keep the authorship information and share with same license.

    • hansl@lemmy.world
      link
      fedilink
      arrow-up
      2
      arrow-down
      1
      ·
      1 year ago

      The FHS was started in 1994 and is free to use. It should be used now by all major Linux systems and most Unix too.

      The only credit is to the Linux Foundation.

      • faerbit@feddit.de
        link
        fedilink
        arrow-up
        2
        ·
        1 year ago

        But $vendor, which supplies $application, doesn’t give a flying fuck about this. I’ve seen binaries in /etc/opt/$application or something like that.

        • hansl@lemmy.world
          link
          fedilink
          arrow-up
          3
          arrow-down
          5
          ·
          1 year ago

          Tell them. Many people don’t know about FHS. Seriously, just the person I was answering to was giving credit to some rando who copy pasted an image from the Linux foundation.

          I’ve been educating people on this all my professional life. I try to make a change with the people around me, but I’ve also filed big to some FOSS projects that got it wrong. Some did the change, some were unwilling. But it’s unknown if even those did follow the right convention in their next project.

  • KISSmyOS@lemmy.world
    link
    fedilink
    arrow-up
    16
    ·
    1 year ago

    Where should I mount my additional internal HDD’s?
    /media doesn’t fit cause they aren’t removable
    /mnt doesn’t fit cause they aren’t mounted temporarily
    Currently I have them mounted as /home/user/data and /home/user/backup.
    Any reason not to do it like this?

    • Eager Eagle@lemmy.world
      link
      fedilink
      English
      arrow-up
      10
      ·
      edit-2
      1 year ago

      tbh I don’t think it matters, so wherever you feel like doing it. I just leave it where the distro or file manager defaults to: in Ubuntu-based distros that’s /media/$USER/mount-name. For mounts shared across users you could drop the $USER.

      Since FHS doesn’t specify where “non-removable media” should go, I don’t think it makes sense to adopt this recommendation as /media should be removable, but rather, “in case the media IS removable, then mount it to /media/”.

    • TheEntity@kbin.social
      link
      fedilink
      arrow-up
      9
      ·
      1 year ago

      If they are internal and permanent (read: unlikely to be removed on a daily basis), I’d just mount them based on their purpose and not them being separate HDDs physically. If they are meant for logs, mount them at /var/log. If they are meant for your movies, /home/user/data is more than fine. In general FHS describes the directory hierarchy, not which parts of it are mountpoints and which are physically on the same media. Technically you’re fine having each and every directory on a separate HDD.

    • zhenbo_endle@lemmy.ca
      link
      fedilink
      English
      arrow-up
      5
      ·
      1 year ago

      I’m also mounting them into /home/user/data while I don’t think hard-coding the user name in the mountpoint is a good idea. Besides, it needs the assumption that I’m the only “human-user” of this computer.

      I may also mount them at /opt/data, but I’m not sure if it’s a good idea

      • callcc@lemmy.worldOP
        link
        fedilink
        arrow-up
        3
        arrow-down
        1
        ·
        1 year ago

        From my humble knowledge I would suggest /var/opt/XXX. It’s the variable part of the /opt hierarchy.

    • pixelscript@lemmy.ml
      link
      fedilink
      English
      arrow-up
      5
      arrow-down
      1
      ·
      1 year ago

      I originally had mine mounted on /, to make them easy to type. But that set one of my highly opinionated friends wretching, so I re-mounted them to /media// to placate him and symlinked them to my home directory instead.

      It’s frustrating how often Linux systems, when approached with a “where is the canonical location for ?” question, have an answer ancient use cases practically no one has anymore, but no satisfying answer for extremely common use cases like permanently mounted backup drives, where to put web server hosted files, or even where to install applications that don’t come from package managers (/opt/? /usr/bin/? /home//.local/?).

    • BronzedBonobo@midwest.social
      link
      fedilink
      English
      arrow-up
      5
      arrow-down
      1
      ·
      1 year ago

      I’m coming more from a server perspective but, fundamentally, all HDDs are “temporary”. Eventually that data might be in a bigger/faster/functioning replacement - so it’s best to treat the drive as something which can always be replaced.

      Continuing that, you might mount to /mnt and then symlink that where you really want it, say …/games. That layer of abstraction allows you to replace the drive without much effect on install. Also allows for expansion via something like mergerfs (*no idea if that’s a good idea for your use cases)

      • callcc@lemmy.worldOP
        link
        fedilink
        arrow-up
        4
        arrow-down
        1
        ·
        1 year ago

        /mnt is explicitly meant to be used as temporary mountpoint for admins. That’s not a good place.

        • BronzedBonobo@midwest.social
          link
          fedilink
          English
          arrow-up
          1
          arrow-down
          2
          ·
          1 year ago

          I’m still learning myself, but I think in a good number of uses cases it qualifies. There are two parts of that explicit definition which seem important, “temporary” and “non-installation”. “Temporary” is the most ambiguous. An array of JBoD storing media files, which can be unplugged really at any time without affecting any system, meets that definition. Game installs or the operating system, less so. I totally get my specific usage may not lend to generic advice. In the interest of me learning, here’s where I started (which advises /mnt): https://perfectmediaserver.com/02-tech-stack/mergerfs/

    • 520@kbin.social
      link
      fedilink
      arrow-up
      3
      ·
      edit-2
      1 year ago

      If it’s just personal files and backups, there’s absolutely nothing wrong with what you’re doing.

      If you had, say, active system config files there, it would make things… complicated to say the least.

  • cerulean_blue@lemmy.ml
    link
    fedilink
    arrow-up
    12
    ·
    1 year ago

    Super useful, thanks. Actually made a lot of things click in my head about how Linux works.

    When did /home get deprecated? Is /usr/local the replacement?

    Sorry for the n00b question (I’m not a noob, but I have been off Linux for a few years), figured the answer may be useful to other users too

  • Samueru@lemmy.ml
    link
    fedilink
    arrow-up
    12
    ·
    edit-2
    1 year ago

    We need something like this for home, I hate that programs like steam and firefox place themselves directly into home instead of ~/.config and ~/.llocal.

    I even move my personal themes to /usr/share/themes because not everything works with ~/.local/share/themes and needs a ~/themes directory instead.

  • netwren@lemmy.world
    link
    fedilink
    arrow-up
    10
    arrow-down
    1
    ·
    1 year ago

    I don’t understand the ambiguity of where to put your projects.

    I’ve typically always put things under /opt/ TIL /etc/opt was where the config should go.

        • callcc@lemmy.worldOP
          link
          fedilink
          arrow-up
          4
          arrow-down
          1
          ·
          1 year ago

          I’m not into those since they just shift the complexity. People should learn how to package things and just do it. Ok, documentation on making dpkgs is pretty tough to understand and confusing.

          But yeah, I guess with docker it’s complete anarchy ( the bad kind of)

  • ancap shark@lemmy.today
    link
    fedilink
    arrow-up
    10
    arrow-down
    1
    ·
    edit-2
    1 year ago

    This is a very useful, very well done chart, congratulations.

    But what a mess is FHS. Easily the worst thing of linux design for me

  • Max_Power@feddit.de
    link
    fedilink
    English
    arrow-up
    10
    arrow-down
    2
    ·
    1 year ago

    Great but what I’m missing is the information that “usr” does not stand for “user”, like many people think or even say. If it would the name could actually be “user” and not “usr”.

    The chart actually does not say what exactly it stands for. It’s “user resources” AFAIK.

    It’s worth clearing this up in my opinion.

    • Danny M@lemmy.escapebigtech.info
      link
      fedilink
      arrow-up
      4
      ·
      1 year ago

      well nix still uses the same structure, the only difference is that files are symlinked to files in subfolders of the /nix/store folder.

      For example you may find that /etc/hosts is just a symlink to /nix/store/69420aaabbbcccdddfffggghhhiii420-hosts

    • TheEntity@kbin.social
      link
      fedilink
      arrow-up
      14
      ·
      1 year ago

      “Local” in this context means local to this whole machine. From the perspective of a single user, it’s system-wide. But then from the perspective of a sysadmin managing dozens of such systems, it’s local.

    • callcc@lemmy.worldOP
      link
      fedilink
      arrow-up
      7
      arrow-down
      1
      ·
      edit-2
      1 year ago

      Many FHS things don’t make much sense for single-user (human user) systems on modern hardware. /usr/local does though. It’s for you (as admin) to install software that doesn’t come with the os.