this post was submitted on 17 Feb 2024
39 points (95.3% liked)

Linux

8090 readers
18 users here now

Welcome to c/linux!

Welcome to our thriving Linux community! Whether you're a seasoned Linux enthusiast or just starting your journey, we're excited to have you here. Explore, learn, and collaborate with like-minded individuals who share a passion for open-source software and the endless possibilities it offers. Together, let's dive into the world of Linux and embrace the power of freedom, customization, and innovation. Enjoy your stay and feel free to join the vibrant discussions that await you!

Rules:

  1. Stay on topic: Posts and discussions should be related to Linux, open source software, and related technologies.

  2. Be respectful: Treat fellow community members with respect and courtesy.

  3. Quality over quantity: Share informative and thought-provoking content.

  4. No spam or self-promotion: Avoid excessive self-promotion or spamming.

  5. No NSFW adult content

  6. Follow general lemmy guidelines.

founded 1 year ago
MODERATORS
 

I'm kinda a newbie to linux (...going on 20 years now, slow learner). I recently came across tldr and don't know how I lived without it, because man pages can be a little much for a non technical person.

Is there a helpfile / command to learn the purpose of the current root directory you are in? I've been reading a few books on Linux at the library, and everything about it kinda fascinates me, and I can't stop asking questions trying to learn about it...

My current question is what is /etc/skel/ . It's an empty directory and it has some purpose. Is there a tool to query what the purpose of this directory is? Like whatis . or something like that, for educational purposes; rather than having to web search/"google" it everytime.

top 13 comments
sorted by: hot top controversial new old
[–] [email protected] 23 points 8 months ago* (last edited 8 months ago) (1 children)

I know you said man pages are too technical but... man hier? https://www.man7.org/linux/man-pages/man7/hier.7.html

       /etc/skel
              When a new user account is created, files from this
              directory are usually copied into the user's home
              directory.

Apparently "skel" is short for "skeleton", i.e. the skeleton for a new user home directory.

[–] [email protected] 5 points 8 months ago

interesting! thank you

[–] [email protected] 15 points 8 months ago* (last edited 8 months ago) (1 children)

This is a pretty quick read with a bit of context for each entry.

https://en.wikipedia.org/wiki/Filesystem_Hierarchy_Standard

(edit: similar content as man hier but with some more historical context and callouts to.other references)

One thing that's important to understand about Linux and its *NIX pedigree is its history of compromises later overcome by Moore's Law and its variants.

UNIX, its precursors, and its derivates has been around for something 50 or 55 years, essentially congealing in Bell Labs and evolving from there. It was conceived and developed when EVERYTHING about computing was expensive in both dollars, cycles and cooling. The zeitgeist of the era emphasized small, efficient operations that did one thing and did it well, reusing as Mich existing code as possible because storing anything extra was more expensive.

The filesystem itself is a study in value engineering, from economizing on the number of bytes in file paths (knowing linkers store that information in symbol tables) to optimizing system images to the most common storage media sizes of the day. The evolution of /bin, /lib, /etc, /sbin, /usr/* and even /home are just interesting reads if you're into deep lore and arcana.

Hope you have fun exploring it, its a dying body of knowledge

[–] [email protected] 3 points 8 months ago

For more context, those UNIX would run on machines that were the size of a large room, if not an entire floor.

And you'd input and get output on a TeleTYpewriter. The video terminals came later. Sometimes you'd dial into them over 300 baud modem. Even just ls / could take a significant amount of time to output if the names were super long, let alone the paper and ink ribbon consumption. And you'd be lucky to even have 80 column output, you'd often have 40 or even less.

DOS came two decades later and still had that 8.3 format because you'd use 5¼ floppies with 320k of space.

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

Not exactly what you're looking for, but for an understanding of the general directory structure in Linux, you might want to have a look at the Filesystem Hierarchy Standard (FHS 3.0). It defines which directories need to exist and what they are supposed to contain. Also, it's a rather light read and not awfully technical.

If you want more of a deeper dive, you might want to get a book that can be used in preparation for an LPIC-1-certification, even if you never intend to take the actual test. I found that they do a really good job at teaching not just the user perspective of Linux (type this to do that), but also the reasoning behind why Linux works the way it does.

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

Regarding /etc/skel being an empty directory, note that it is one of the few places outside /home where you can actually expect hidden files :) On my Arch it contains Bash dotfiles, for example.

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

ahhhh. ls -a reveals its true contents. thank you!

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

The default files for each new user are stored in this directory. Each time a new user is added, these skeleton files are copied into their home directory. An average system would have: .alias, .bash_profile, .bashrc and .cshrc files. Other files are left up to the system administrator

https://tldp.org/LDP/Linux-Filesystem-Hierarchy/html/etc.html

[–] [email protected] 4 points 8 months ago (2 children)
[–] [email protected] 8 points 8 months ago* (last edited 8 months ago) (1 children)

interesting video thanks. Didn't realize etc was Editable Text Configurations, thought it meant etc, as in et cetera

[–] [email protected] 2 points 8 months ago

It could be both!

[–] [email protected] 1 points 8 months ago

Here is an alternative Piped link(s):

https://piped.video/42iQKuQodW4

Piped is a privacy-respecting open-source alternative frontend to YouTube.

I'm open-source; check me out at GitHub.

[–] [email protected] 3 points 8 months ago

Not sure it helps with /etc/skel (never heard of it before) but this is a cool infographic: https://whimsical.com/fhs-L6iL5t8kBtCFzAQywZyP4X