- cross-posted to:
- [email protected]
- cross-posted to:
- [email protected]
Just forwarded this pic to my dad. I’ll be guiding him in installing Mint on one of his old Windows desktops this coming Saturday! Wish us luck in the coming years 😂
Y’all got this! Good luck 🍀
This image is misinformation. That’s not a filesystem, that’s a layout standard called the FHS. Filesystems are FAT32, BTRFS, EXT4, etc.
I’m sure this guy’s dad that needs help installing Linux will appreciate the clarification, good thing you’re here to point that out
I always thought /usr was for “user”… TIL
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.
/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.
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.
Huh. I did as well. Like /use/bin was for user installed applications and such. You learn something everyday.
honestly /home should has never been created we should have kept user homes in /usr
why
Because housing prices are ridiculous.
A good first approximation.
So where in this setup would you mount a network share? Or am additional hard drive for storage? The latter is neither removable nor temporary. Also
/run
is quite more than what this makes it seem (e.g. user mounts can be located there), there is practically only one system path for executables (/usr/bin
)…Not saying that the graphic is inherently wrong or bad, but one shouldn’t think it’s the end all be all.
On debian when i mount an ftp server through my file browser it uses gvfs
This will mount it to /run/user/1000/gvfs/ftp:host=<IP>,port=<PORT>,user=<fpt-user>
I’m gonna blow everyone’s mind… I have my Linux system in a relatively small 4gb drive, and my home in a 4Tb drive. I mount my 4tb drive to /home/me as someone already said.
If my SSD for my OS takes a shit as people say, all you do is install it again, change fstab to swap the home directory and you’re back in business like nothing happened. That’s like 10 minutes install time on a good SSD these days. The other guy who mentioned this, didn’t point this out. The idea of separating my home folder into its own drive didn’t occur to me for years and years of using Linux. Every wrong update I was there copying home like a total windows 11 noob. I also install my extra drives and shares on /mnt, that’s standard.
I do /volumX for additional hard drives.
For most network share I use /mnt/$server.
Or /home/me/drive
For most network share I use /mnt/$server.
I use
/mnt/$proto/$server
, though that level of organization was probably overkill. Whatever…I do /volumX for additional hard drives.
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.
Sure but for example I understand that /dev and /proc are actually kind of filesystems on their own
Right?
I was expecting superiors to the fat & exfat file storage systems
Yep, You are right. Done
To be more pedantic the correct title would be the Filesystem Hierarchy Standard (FHS)…which describes the directory structures
immuatables be all about /var
NixOS enters the room wearing a “/nix/store” t-shirt.
Nix really has a kickass way of doing this. Won’t conflict anywhere and always let’s you know what is managed by Nix.
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.
I don’t get why this sort of picture always gets posted and upvoted when it’s wrong for most distros nowadays.
It seems handy when you’re learning about stuff but only when you haven’t learned enough to realize it’s not correct.
Can you recommend one that is correct? I use pop_os (Ubuntu) and Arch. Kinda curious about either one
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.
On my distro(Bazzite), /mnt is only a symlink to /var/mnt. Not sure why, but only found out the other day.
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.
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 :)
See file-hierarchy(7).
/opt/(app)/bin /usr/lib/(app)/bin /usr/lib64/app/bin /usr/local/(s)bin
I know there is logic and mapping of where everything’s supposed to be in theory but in practice s***'s kind of all over the place.
The logic was just that when UNIX was originally evolving, they ran out of disk space on their PDP-11 and had to start moving less-essential binaries to a different disk. That’s why it’s “/usr/” which was originally for user data but that disk happened to have free space.
Any other explanation is just retcon. Some distros try to simplify things.
A blast from the past!
This is one of my biggest gripes stopping me from switching to Linux. I just can’t give-up windows’ partitions. I find Unix/Linux file system to be incompatible with how I like storing my files.
This image shows how the system stores it’s own stuff. Your junk will go in /home/mtchristo/whatever you want.
If you don’t like that, you can do whatever you want. Linux will let you.
Think of it like in Windows where you have this structure.
That’s an old imag, though - Windows has a C:\Users\youruser setup like /home/youruser for a while now.
I find the %APPDATA% thing way less convenient than ~/.config and I’m quite happy when programs don’t have the “bug” that they still use ~/.config on Windows.
Yeah, but my point is that every OS has system folders. And Linux gives you more freedom.
You can just create partitions and mount them at whatever path you like.
Hell, you can do /c/not/sure/why/you/like/this/better/clownfarts_penis
When you run git-bash from an install of the git suite, that’s a valid pathname.
Oh. Just on my system?
I like partitions to be at the root of my file system. And dedicate each one to a specific use. And even dedicate a separate hard drive for my personal files. When in need of transfer or repairs just move this drive to another PC and carry on the work while the former PC gets repaired or nuked.
You can absolutely do this. You can mount partitions anywhere off of /
I have 5 drives in a system and I mount them as /storage1 through /storage5
The icon for media reminds me of a bidet on a floor plan.
Why is /mnt a “temporary” mounting point? I alwags put my permanent ones there. I’d say /media is temporary…
Not when I use it!