• InverseParallax@lemmy.world
      link
      fedilink
      English
      arrow-up
      11
      ·
      2 months ago

      It did, let me explain:

      On the original (ie Thompson and Ritchie at Bell in 1969-71), I think it was a PDP-11, they installed to a 512kb hard disk.

      As their “stuff” grew they needed to sprawl the OS to another drive, so they mounted it under /usr and threw OS components that didn’t fit.

      https://landley.net/writing/unixpaths.pdf

      I’ve done the same, outgrew so you mount under a tree to keep going, it just never became a historical artifact.

    • HereIAm@lemmy.world
      link
      fedilink
      arrow-up
      2
      ·
      2 months ago

      Huh. I did as well. Like /use/bin was for user installed applications and such. You learn something everyday.

    • jalkasieni@sopuli.xyz
      link
      fedilink
      arrow-up
      22
      ·
      2 months ago

      It is, this infographic is wrong. Or I guess technically some other standard could define it like the infographic, but the Filesystem Hierarchy Standard defines it as a secondary hierarchy specifically for user data.

      • Avatar_of_Self@lemmy.world
        link
        fedilink
        English
        arrow-up
        5
        ·
        edit-2
        2 months ago

        /usr used to be the user home directory on Unix…well most of them. I think Solaris/SunOS has always been /export/home as I recall.

  • wvstolzing@lemmy.ml
    link
    fedilink
    arrow-up
    38
    ·
    2 months ago

    A pedantic thing to say, surely, but the title really should’ve been: “Linux Directory Structure” – ‘Linux filesystems’ (the title in the graphic) refers to a different topic entirely; the title of this post mitigates the confusion a bit, though still, ‘directory structure’ is the better term.

    • Sonotsugipaa@lemmy.dbzer0.com
      link
      fedilink
      English
      arrow-up
      3
      ·
      2 months ago

      Nah, it’s just that /proc is incorrect - it contains information about running processes, as well as kernel data structures as visible by the process reading them.

    • BananaTrifleViolin@lemmy.world
      link
      fedilink
      English
      arrow-up
      2
      ·
      edit-2
      2 months ago

      No I thinks is basically right although could be better worded maybe

      /sys is virtual file structure for kernel system info

      /proc is virtual file structure of kernel process info

      My understanding is /proc came first but was abused/free for all and started being used for all sorts of non standard/process kernel access. So /sys was created with stricter rules to make it more standardised.

    • brianary@startrek.website
      link
      fedilink
      arrow-up
      12
      arrow-down
      2
      ·
      2 months ago

      There’s a little historical baggage, but look at Windows: multiple letters for drives, and all of the paths can be modified, so you have to ask Windows where any important directory is physically mapped (like SystemRoot or Documents or Temp or Roaming AppData or many others), because it doesn’t have this nice consistent structure like Linux. Linux presents a logical layer and manages the physical location automatically. Windows makes you do the logical lookup yourself, but doesn’t enforce it, so inexperienced programmers make assumptions and put stuff where the path usually is.

      That’s part of why logging in to Windows over a slow connection can take forever if you have a bunch of Electron apps installed: they’ve mismapped their temp/cache directory under the Roaming AppData, so it gets synched at every login, often GiB of data, and they refuse to fix it.

      • ByteOnBikes@slrpnk.net
        link
        fedilink
        arrow-up
        6
        ·
        2 months ago

        I switched to Linux a few years ago and you are not wrong.

        Windows is a nightmare with directory organization.

        Saved games can go:

        • My Documents/
        • My Documents/Games
        • My Documents/My Games
        • <app>/saved-games
        • Grass@sh.itjust.works
          link
          fedilink
          arrow-up
          7
          ·
          2 months ago

          I’m more used to seeing shit like: c:/users/username/appdata/local/developer/game/engine/data3/saves/profile0/epe90_cats90-slot203.nonstandardfileformat

          • jcg@halubilo.social
            link
            fedilink
            arrow-up
            5
            ·
            2 months ago

            And then their non standard file format turns out to just be a zip file or gzipped JSON data 😂

  • RandomVideos@programming.dev
    link
    fedilink
    arrow-up
    9
    ·
    2 months ago

    I have always wondered why there was a developer folder(/dev)

    Now i know that the government is trying to make people think it stands for something else so they can replace all programmers with advanced random number generators

  • Hyacin (He/Him)@lemmy.ml
    link
    fedilink
    English
    arrow-up
    52
    arrow-down
    2
    ·
    2 months ago

    I learned about 16 years ago on a Solaris course that /usr wasn’t “user”, I still say “user”, but I’m happy to see the information spreading that that isn’t what it actually is.

    • ulterno@lemmy.kde.social
      link
      fedilink
      English
      arrow-up
      10
      ·
      2 months ago

      I used to pronounce it like yuzr, knowing that it wasn’t user, but not knowing what it was.
      Now I have better context. Maybe I’ll go with U.S.R.

      • Malfeasant@lemm.ee
        link
        fedilink
        arrow-up
        1
        ·
        2 months ago

        If you want to confuse people… I pronounce /etc as “ets”, but one of my coworkers recently called it “slash e t c” and I had to ask him to repeat it a couple times before I figured out what he meant…

        • ulterno@lemmy.kde.social
          link
          fedilink
          English
          arrow-up
          0
          ·
          2 months ago

          Well, considering that I am with coworkers who don’t remember when to and not to put the ‘/’ at the start of the file path (despite me explaining it to them multiple times), “slash e t c” is probably the better way.

    • nadir@lemmy.world
      link
      fedilink
      arrow-up
      12
      ·
      2 months ago

      usr did originally mean user and held user data.

      Pretty sure this is a bacronym

  • Leaflet@lemmy.world
    link
    fedilink
    English
    arrow-up
    85
    arrow-down
    3
    ·
    2 months ago

    I don’t get why this sort of picture always gets posted and upvoted when it’s wrong for most distros nowadays.

    • TrickDacy@lemmy.world
      link
      fedilink
      arrow-up
      12
      ·
      2 months ago

      Can you recommend one that is correct? I use pop_os (Ubuntu) and Arch. Kinda curious about either one

      • Leaflet@lemmy.world
        link
        fedilink
        English
        arrow-up
        35
        arrow-down
        1
        ·
        edit-2
        2 months ago

        Not aware of any correct pictures, but I can tell you what’s wrong with this one

        • /usr: explaining it as “Unix System Resources” is a bit vague
        • /bin: /bin is usually a symlink to /usr/bin
        • /sbin: /sbin is usually a symlink to /usr/sbin, distros like Fedora are also looking into merging sbin into bin
        • /opt: many, I’d say most, “add-on applications” put themselves in bin
        • /media: /media is usually a symlink to /run/media, also weird to mention CD-ROMs when flash drives and other forms of storage get mounted here by default
        • /mnt: i would disagree about the temporary part, as I mentioned before, stuff like flash drives are usually mounted in /run/media by default
        • /root: the root user is usually not enabled on home systems
        • /lib: /lib is usually a symlink to /usr/lib

        I would also like the mention that the FHS standard wasn’t designed to be elegant, well thought out system. It mainly documents how the filesystem has been traditionally laid out. I forget which folder(s), but once a new folder has been made just because the main hard drive in a developer’s system filled up so they created a new folder named something different on a secondary hard drive.

        • TrickDacy@lemmy.world
          link
          fedilink
          arrow-up
          5
          ·
          2 months ago

          Thanks for this. I’m always confused by the layout and this tend to stick to putting things in the same places, even if they’re wrong :)

        • Sunny' 🌻@slrpnk.net
          link
          fedilink
          arrow-up
          3
          ·
          2 months ago

          On my distro(Bazzite), /mnt is only a symlink to /var/mnt. Not sure why, but only found out the other day.

          • Leaflet@lemmy.world
            link
            fedilink
            English
            arrow-up
            1
            ·
            2 months ago

            I’m using Silverblue and it also symlinks to /var/mnt. I don’t think it does that on traditional distros, like Fedora 40 Workstation.

            • LeFantome@programming.dev
              link
              fedilink
              arrow-up
              1
              ·
              2 months ago

              I assume it is because /var can be written to while the rest of the filesystem ( outside /home ) is expected to be read-only.

    • Kusimulkku@lemm.ee
      link
      fedilink
      arrow-up
      8
      arrow-down
      1
      ·
      2 months ago

      It seems handy when you’re learning about stuff but only when you haven’t learned enough to realize it’s not correct.

  • SavvyWolf@pawb.social
    link
    fedilink
    English
    arrow-up
    5
    ·
    2 months ago

    If my /bin contains exe files, something has gone very wrong somewhere…

    Also, all these infographics are a sad casualty of the /usr/bin merge.