DEV Community

Ryan Westlund
Ryan Westlund

Posted on

Technical differences between Linux and BSD?

Every article I find on Google comparing the two is either a mostly nil comparison or mainly about non-technical differences (Linus vs FreeBSD core team, kernel vs complete OS - ie. taking advantage of the question using the term Linux instead of GNU+Linux to not answer the intended question).

I'm interested in learning more about the technical/architectural differences between BSD and Linux.

I know of a few differences:

  • Linux separates the kernel from the base system (ie. Linux/GNU), whereas for BSDs the two are coupled

  • Linux doesn't have SIGINFO

  • FreeBSD has jails (but that's FreeBSD only, not even other BSDs have it)

  • Linux uses procfs (BSDs do support this but tend not to use it)

  • BSDs have ZFS (I don't really know the practical implications versus Linux filesystems, though that should probably be a separate discussion)

But that's pretty much all I know.

To give examples of the kind of stuff I'm looking for:

  • Different features related to process priority or scheduling

  • Differences in approach to things like threading and inter-process/thread communication

  • Differences in ability/means to get the information you get from tools like sockstat, fstat, netstat (I know Linux and BSD have slightly different tools in this area but don't know if either really has any capabilities the other doesn't)

  • I guess different ideas of things like Capsicum/ACLs and extended file attributes would count (things I know very little about themselves, but they seem to be extremely fringe)

Discussion (4)

zilti profile image
Daniel Ziltener

Well, the thing with the different BSDs is that they all have different kernels. Sure, they are all derived from the same kernel from decades ago, but the differences are significant. So you cannot really compare BSD to Linux, because there is no BSD OS.

But another difference that comes to mind: BSD OSes strictly separate the system programs from the user installed programs. Which means multiple things:

  • first, the ports tree / pkgsrc / binary packages are on a release schedule decoupled from the OS itself. This leads to things like being able to actually use pkgsrc on a whole bunch of operating systems.
  • second, the programs and all their config dirs are in a subdirectory from root. This is e.g. in NetBSD under /usr/pkg.

Beyond that, it really comes down to which BSD you refer to.

yujiri8 profile image
Ryan Westlund Author

Ah, thanks for pointing these out. I guess if I had to pick a BSD to compare it would be FreeBSD.

easrng profile image

Actually, GNU/BSD exists. Ever heard of Debian GNU/kFreeBSD?

yujiri8 profile image
Ryan Westlund Author

No, I'll have to research that sometime