this post was submitted on 11 Dec 2023
569 points (98.5% liked)

Linux

47325 readers
946 users here now

From Wikipedia, the free encyclopedia

Linux is a family of open source Unix-like operating systems based on the Linux kernel, an operating system kernel first released on September 17, 1991 by Linus Torvalds. Linux is typically packaged in a Linux distribution (or distro for short).

Distributions include the Linux kernel and supporting system software and libraries, many of which are provided by the GNU Project. Many Linux distributions use the word "Linux" in their name, but the Free Software Foundation uses the name GNU/Linux to emphasize the importance of GNU software, causing some controversy.

Rules

Related Communities

Community icon by Alpár-Etele Méder, licensed under CC BY 3.0

founded 5 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?

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

Dark mode

Old version

top 50 comments
sorted by: hot top controversial new old
[–] Admax 31 points 9 months ago (6 children)

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 23 points 9 months 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.

load more comments (5 replies)
[–] [email protected] 18 points 9 months ago (2 children)
[–] eager_eagle 8 points 9 months ago

it bothers me a little the entry is not called fhs: man fhs

[–] callcc 4 points 9 months ago

Added to new version. Thanks for the suggestion.

[–] Rustmilian 13 points 9 months ago (6 children)

I really like this, but can I have a black background version please?

load more comments (6 replies)
[–] [email protected] 12 points 9 months ago (1 children)

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

[–] vole 14 points 9 months ago (1 children)

/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

[–] [email protected] 5 points 9 months ago* (last edited 9 months ago) (2 children)

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...
[–] callcc 4 points 9 months ago

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

load more comments (1 replies)
[–] [email protected] 12 points 9 months ago* (last edited 9 months ago) (4 children)

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.

load more comments (3 replies)
[–] [email protected] 9 points 9 months ago* (last edited 9 months ago) (1 children)

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

load more comments (1 replies)
[–] netwren 9 points 9 months ago (9 children)

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.

load more comments (9 replies)
[–] [email protected] 9 points 9 months ago (1 children)

I'm surprised to hear /home is non standard.

[–] callcc 5 points 9 months ago (1 children)

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.

[–] Rustmilian 4 points 9 months ago (1 children)

Are you planning on doing one for XDG?

load more comments (1 replies)
[–] [email protected] 8 points 9 months ago (2 children)

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.

[–] callcc 5 points 9 months ago

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.

[–] [email protected] 4 points 9 months ago

That's just retconning/backronyming it.

/usr does historically stand for user. It's where the user home directories were on old Unix versions.

[–] [email protected] 8 points 9 months ago (2 children)
[–] [email protected] 4 points 9 months ago (2 children)

does guix go the same was as nixos in that regard? where can I find info regarding FHS in guix?

[–] callcc 5 points 9 months ago

Afaik guix is very similar to nixos in that respect. The store where applications are installed is called /gnu there.

load more comments (1 replies)
[–] [email protected] 3 points 9 months ago

FHS? Who needs that?

[–] [email protected] 7 points 9 months ago (2 children)

Nicely done! Do you perchance have any hi res version?

[–] callcc 4 points 9 months ago (2 children)

Thanks! Unfortunately I've used closed source whimsical.com for this and don't have a paid subscription. They only offer low-res for those accounts since recently :(

load more comments (2 replies)
load more comments (1 replies)
[–] [email protected] 7 points 9 months ago* (last edited 9 months ago) (2 children)

how is /usr/local local and not system-wide? i though it was for programs you compiled yourself?

[–] [email protected] 14 points 9 months ago (1 children)

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

[–] [email protected] 4 points 9 months ago

thanks for the explanation!

[–] callcc 5 points 9 months ago* (last edited 9 months 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.

[–] [email protected] 7 points 9 months ago (3 children)
load more comments (3 replies)
[–] Crow 6 points 9 months ago (1 children)

So why does my system mount my drives to /run/user/1000…?

[–] callcc 10 points 9 months ago (1 children)

1000 might by your user's user-id

[–] [email protected] 6 points 9 months ago (1 children)

1000 is the default ID given to the first-created user on Debian-based systems.

May or may not be the case with other distros. Haven't checked.

load more comments (1 replies)
[–] [email protected] 4 points 9 months ago (4 children)

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

load more comments (4 replies)
[–] worldofbirths 4 points 9 months ago

Looks great!

load more comments
view more: next ›