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
deleted by creator
You leave NixOS alone!!
I profess my ACAB creed by having directories like
/ssd
,/hdd
,/backups
ikr? NixOS is particularly bad
That’s a deliberate decision
I really like this, but can I have a black background version please?
Added a black background version.
Not bad, but not quite what I had in mind as you see the blue carrot, lol. Would you perhaps share your project files?
I unfortunately did it in whimsical.com which is great but also closed if you don’t pay. https://whimsical.com/fhs-L6iL5t8kBtCFzAQywZyP4X is the best I can do.
You could create a Github repo for it and store it as an SVG file.
You could invert the colors in GIMP or similar.
That wouldn’t look as good tho. I want the black text to be white and the white background to be black not invert everything.
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
/home is not deprecated, it’s optional but common. Here is the section from FHS: https://refspecs.linuxfoundation.org/FHS_3.0/fhs/ch03s08.html
then the legend should be fixed its confusing, as is the whole idea of FHS is outdated and a chore for new users to get into (i still don’t fully understand it)
- difference between /media and /mnt
- wtf is /run? some glorified /temp?
- /usr/sbin “non vital system binaries” … aha ok, whatever don’t tell me you understand the difference between 6 (SIX !) differen bin/sbin folders
- could continue forever…
The legend is a bit broken. Will fix it maybe.
As for the rest, yes, the FHS can be confusing. It’s from a time where mostly professional admins would deal with it and requirements were pretty different from today’s end-user systems. If you want to understand more, I urge you to read the spec. It’s highly readable! https://refspecs.linuxfoundation.org/FHS_3.0/fhs.html
/mnt is for more permanent stuff. /run is for shit like a USB drive some user has connected. It’s the place that most distro automount your attached storage by default (/run/$USER/$DEVICE/)
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.
My personal pet peeve is that Firefox profiles are in
~/.mozilla/firefox
and Thunderbird profiles are in~/.thunderbird
.
If your flagship product creates a folder named after your company, why not use it for all software by your company???Thunderbird isn’t really developed by Mozilla any more. It’s owned by a subsidiary of Mozilla and is mostly community-run.
Thanks, I just went down this rabbit hole and discovered xdg ninja and managed to clean most of my home, I even found a useful script that launches steam on a fake home directory on .local.
Uhh, very nice. I didn’t know about xdg-ninja.
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
The better you understand it the less it seems bad.
I’m surprised to hear /home is non standard.
I guess the reason it’s not in FHS is that FHS is concerned about system wide things whereas /home is the opposite. It’s the user’s realm.
There is XDG for /home/$user though.
Are you planning on doing one for XDG?
I’ll have a look but probably not.
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.
Thanks for the input. Things are complicated: https://askubuntu.com/a/135679 . Apparently it originally meant “user” but then slowly was used for system stuff. So people invented backcronyms.
That’s just retconning/backronyming it.
/usr does historically stand for user. It’s where the user home directories were on old Unix versions.
laughs in guix
does guix go the same was as nixos in that regard? where can I find info regarding FHS in guix?
Afaik guix is very similar to nixos in that respect. The store where applications are installed is called /gnu there.
yeah it uses /gnu instead of /nix
FHS? Who needs that?
Laughs in Nix
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
Not everything is in its FHS location, unless you use steam-run. Binaries arwn’t in /bin, for example
I mean fair enough, some files are in /run/current-system/sw/
Related:
man hier
I’ve never seen
/etc/opt
used. Usually if an app is in/opt
, the entire app is there, including its config which is frequently at/opt/appname/etc/
./opt is kinda legacy at this point. That used to be the location where you’d install software manually in the past but I haven’t seen it used for some time, it was more common in the 00’s.
I still put all my standalone apps in there (meaning apps that are often statically compiled and expect the executable, logs, and config to be in the same directory), as well as apps that have their own docker-compose.yml file. Should I be putting them somewhere else? I know
/srv
exists but I’ve never used it and I don’t think Debian creates it by default.That seems like a fine use for /opt
Quest One Identity does.
deleted by creator
What would a use case be for
/usr/bin
versus
/usr/local/bin
Binaries in the former are installed by the OS/package manager, binaries in the latter are installed manually by the user, for example by compiling from source and running
make install
Great. Now I gotta refactor some scripts.
Nicely done! Do you perchance have any hi res version?
how is /usr/local local and not system-wide? i though it was for programs you compiled yourself?
“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.
thanks for the explanation!