Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

package management and administration is a great start to explaining the differwnces, but what I would really like to see is a low level explanation of the differences. To what extent does BSD follow the "everything is a file" philosophy that linux does. Where is information about devices and processes to be found?

coming from a Gentoo background, where portage is based on the bsdports system, package management is not all that foreign in BSD. But when it comes time to tweak things, I start missing my sysfs and procfs, mostly throug ignorance of how BSD does such things.




> To what extent does BSD follow the "everything is a file" philosophy that linux does. Where is information about devices and processes to be found?

You got this the wrong way around. "Everything is a file" is a core UNIX feature, and predates Linux by more than 20 years.


I think that "most everything is a file" is a core UNIX feature. "Everything is a file" really comes from Plan 9: http://en.wikipedia.org/wiki/Plan_9_from_Bell_Labs (see Design Concepts, /net, and /proc)


In Unix it is rather "everything has a file descriptor at API level" while in Plan9 it is really "everything is a file" from the system standpoint.

It is not surprising since Plan9 also came from Bell Labs, and they learned the lessons of Unix, raising the idea to a new level.


The "everything is a file" philosophy came from the original Unix, but didn't quite stay consistent when things like sockets were added later. Like Linux, BSD keeps its device info in /dev.

/proc doesn't come from Linux, it comes from plan9. The /proc in Linux is a weak knock-off, since Linux doesn't support per-process mount points the way plan9 does. I don't know about FreeBSD, but OpenBSD has a port of /proc roughly on par with Linux's.


FreeBSD has procfs, although it's not mounted by default.

    mount -t procfs proc /proc
    ls -alR /proc


I have not been using a bsd system for a long long time, but from what I recall at least freebsd had the same kind of virtual FSs that linux had, procfs on /proc and devfs on /dev but no separate sysfs on /sys.

I suspect though that you may have wanted to investigate sysctl(8) for your tweaking needs http://www.freebsd.org/cgi/man.cgi?query=sysctl&sektion=...


I understand that this is a UNIX trait, I tried to choose my words carefully. Linux follows that philosophy (to some extent). Not: that is a Linux philosophy.

My main curiosity comes from how Mac OS X, being a sort of flavor of BSD, also follows that philosophy. The Mach kernel probably messes all that up though. Anyone familiar with the such things?




Consider applying for YC's Fall 2025 batch! Applications are open till Aug 4

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: