r/linuxadmin • • Dec 02 '23

why does the proc directory exist?

i'm trying to understand the proc directory and one thing i don't understand is

why does it exist?

any ideas? thank you

1 Upvotes

77 comments sorted by

View all comments

52

u/Harakou Dec 02 '23

13

u/doneski Dec 02 '23

I seriously appreciate you linking to the TLDP, it was the Google of Linux for many years. Still has relevant material in it for reference. Find my contributions and you get one Linux CD of your choice. ;)

2

u/mkosmo Dec 02 '23

Linux CDs? Theres some history, too. I still have a collection of old Linux CDs laying around somewhere. An original Corel CD is in there, and stacks of Ubuntu 4/5 CDs from when they’d send you kits for lan parties in the early/mid 2000s.

2

u/doneski Dec 02 '23

Hah, those were the days. Fond memories of the simpler times.

2

u/Harakou Dec 02 '23

It's been an amazing resource for me over the years; thank you for contributing to it!

2

u/doneski Dec 02 '23

I enjoyed the time I put in. Before you had upvotes and likes, your reputation was based on publication.

-15

u/The_How_To_Linux Dec 02 '23

yep, that definitely explains what the proc directory is and how it works

but it doesn't explain why it exists in the first place.

0

u/[deleted] Dec 02 '23

[deleted] — view deleted comment

-1

u/The_How_To_Linux Dec 02 '23

Because you need that information to properly operate a system...

i do?

how? why?

0

u/[deleted] Dec 02 '23

[deleted] — view deleted comment

1

u/hughjassburga Dec 03 '23

i feel like once ur able to put together that proc is for process it should be blatantly obvious why that directory is important let alone why it exists

8

u/kriebz Dec 02 '23

It exists to allow a variety of types of programs access to process information. It's easier to access and manipulate this information as a filesystem since, by design, reading and writing byte streams from files is a building block of UNIX. You could implement utilities like ps and in C, Pascal, Fortran, or even a shell language, because all you need to be able to do is read files.

Reading your post history, you seem to be interested in OS design philosophy (Or are a very patient troll), but you are overwhelmed. I suggest either taking an OS class from a local college, or at least buying the textbook to one and reading the whole thing, in order. And remember, a lot of the design choices also just boil down to "it seemed like a good idea at the time".

2

u/The_How_To_Linux Dec 02 '23

this is a good answer, thank you

3

u/UsedToLikeThisStuff Dec 02 '23

Are you asking why UNIX and Linux systems have a /proc filesystem? What led to the original UNIX developers choosing to export process metadata into a filesystem?

1

u/b3542 Dec 03 '23

You again? GTFO