this post was submitted on 11 Dec 2023
246 points (98.4% liked)

Selfhosted

41005 readers
592 users here now

A place to share alternatives to popular online services that can be self-hosted without giving up privacy or locking you into a service you don't control.

Rules:

  1. Be civil: we're here to support and learn from one another. Insults won't be tolerated. Flame wars are frowned upon.

  2. No spam posting.

  3. Posts have to be centered around self-hosting. There are other communities for discussing hardware or home computing. If it's not obvious why your post topic revolves around selfhosting, please include details to make it clear.

  4. Don't duplicate the full text of your blog or github here. Just post the link for folks to click.

  5. Submission headline should match the article title (don’t cherry-pick information from the title to fit your agenda).

  6. No trolling.

Resources:

Any issues on the community? Report it using the report flag.

Questions? DM the mods!

founded 2 years ago
MODERATORS
 

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?

Edit: Put up new version

Dark mode

Dark mode

top 18 comments
sorted by: hot top controversial new old
[–] Discover5164@lemm.ee 6 points 1 year ago

i wonder why nixos adopted a different hierarchy...

[–] AFLYINTOASTER@lemmy.world 5 points 1 year ago (2 children)

I am new to Linux, is this the current "standard" file system?

[–] korthrun@lemmy.sdf.org 19 points 1 year ago

Bonus tip: Many distros make this info available on the cli by including a "hier" man page that you can read using the command "man hier".

[–] callcc@lemmy.world 6 points 1 year ago (1 children)

Yes, it is. FHS stands for Filesystem Hierarchy Standard.

[–] AFLYINTOASTER@lemmy.world 6 points 1 year ago

What an amazing cheat sheet then!

I'm about to print this out to add to my pile, thanks for taking the time.

[–] SciPiTie@iusearchlinux.fyi 4 points 1 year ago* (last edited 1 year ago) (1 children)

This is really helpful, thank you!

I never understood why the shareable /usr is parent to the non shareable /usr/local. Wouldn't a /usr/shared be way easier especially in the early network days?

If anyone has a link or some insights into this historical nitbit I'd highly appreciate it!

[–] Markaos@lemmy.one 2 points 1 year ago (1 children)

No comment on sensibility, but technically both are equally difficult - mount the parent filesystem, then mount the child filesystem into an empty directory in the parent. Doesn't matter which one is where, it's all abstracted away at this level anyway.

[–] SciPiTie@iusearchlinux.fyi 2 points 1 year ago (1 children)

But when I mount a shared /usr on a remote machine it will always have the mount point /usr/local as empty folder - and either have an empty folder or have a mount target that is dependent on a network resource - that's why for me it's so unintuitive.

But then again I started with network stuff way more than a decade after all this got created 🤣

[–] Markaos@lemmy.one 2 points 1 year ago (1 children)

~~I think the idea at the time was that if /usr is unavailable, you won't be doing much with the system anyway (other than fixing the configuration).~~

Nevermind, apparently the original meaning had nothing to do with a network (TIL for me), so our discussion is kinda moot. See section 0.24 in this 2.9BSD (1983) installation guide

Locally written commands that aren't distributed are kept in /usr/src/local and their binaries are kept in /usr/local. This allows /usr/bin, /usr/ucb, and /bin to correspond to the distribution tape (and to the manuals that people can buy). People wishing to use /usr/local commands are made aware that they aren't in the base manual.

[–] SciPiTie@iusearchlinux.fyi 2 points 1 year ago

Ohhh now that is awesome and makes sense! Thanks a lot for that find :)

[–] Scrath@feddit.de 3 points 1 year ago (2 children)

I have 2 questions:

Do I understand the colors correctly in that /home is deprecated and shouldn't be used? What's the alternative in that case?

Where would you guys put configuration files for services? /srv seems like an adequate directory

[–] legios@aussie.zone 2 points 1 year ago* (last edited 1 year ago)

I'm trying to remember this correctly, but traditionally /home is a symlink of /usr/home. I think that's deprecated and you should now just have /home

[–] callcc@lemmy.world 2 points 1 year ago* (last edited 1 year ago)

The colors are confusing. I meant to mark /home as non-standard since it's not mandated by the FHS.

The FHS doesn't specifically mention the config of webservices but /srv seems good to me. Read https://refspecs.linuxfoundation.org/FHS_3.0/fhs/ch03s17.html for more info.

Edit: Changed colors

[–] dan@upvote.au 3 points 1 year ago

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/.

[–] vext01@lemmy.sdf.org 1 points 1 year ago
[–] detonator9798@lemmy.one 1 points 1 year ago (1 children)

Where to mount permanent HDDs? Always thought it was in /mnt but the description says it's for temporarily filesystems..

[–] callcc@lemmy.world 1 points 1 year ago

I think the FHS doesn't really tell you where. In the end you can out them wherever you want as long there is no conflict with the FHS. Even /mnt/something seems fine. Just not really recommended.

[–] tagginator@utter.online -4 points 1 year ago

New Lemmy Post: Filesystem Hierarchy Standard - Reference Poster / Cheatsheet (https://lemmy.world/post/9437468)
Tagging: #SelfHosted

(Replying in the OP of this thread (NOT THIS BOT!) will appear as a comment in the lemmy discussion.)

I am a FOSS bot. Check my README: https://github.com/db0/lemmy-tagginator/blob/main/README.md