Hacker News new | past | comments | ask | show | jobs | submit login
A Journey from Linux to FreeBSD (freebsdfoundation.org)
87 points by BSDobelix 8 days ago | hide | past | favorite | 60 comments





I have used FreeBSD for work and play since version 1.1.5. Never had any trouble with it. Since more than 10 years I am also running it on notebook computers.

Back in the days a friend visited and we talked about fork bombs. I fetched a spare FreeBSD box and ran the infamous shell script on it. System performance went down to a crawl, but I was still able to log in on a different virtual console and shut the machine down. Many systems back then would not have recovered from that.


What won me over is how it treats an NFS share going away. Linux gets so weird you need to reboot but FreeBSD is usable to the point I can fix the issue.

Honestly it’s the same with out of memory issues too.

I just can think about my FreeBSD boxes less.


Yep, you can test this right now, do a "stress -c 320" (that's 10 times the number of cores I have), a linuxbox starts to stutter massively (sometimes even audio), with FreeBSD no stuttering at all, just a bit less responsive.

Ok but when I run it on my notebook, WiFi is slow, the laptop crashes when I connect it to a docking station, audio doesn't work and suspend and resume is broken. And this on a Linux certified machine.

'notebook computer' is so ambiguous as to be useless.

go find one of those 'notebook computer's that the dev team uses (probably a few-generations-old thinkpad or dell) and go see what the experience is like if you're unwilling or unable to put the work into getting your machine to run as you wish.

furthermore this isn't a solved issue for ANY OS on the fringe of the computer market. Go install the newest version of Windows on a Chuwi machine and see how many drivers are MIA and functionalities lost. Install Linux on an obscure VAIO or Toughbook and see what happens.

Regardless of the promises and hoped-for-wishes, EVERY os is hardware-centric, and they all have different orbits.

The BSDs just tend to make choices that give them one of the widest arrangement of choices in the 'will-it-run-on-this' category.


> EVERY os is hardware-centric, and they all have different orbits

Kind of why I like macOS (works fine on any Mac, with about 7 years of support – though I wish it were 10, and x86 support may stop sooner) and Windows (runs on any x86 PC, games work without issue, years of updates and backward compatibility.)

But on a mainstream x86 laptop like a ThinkPad, I'd expect Ubuntu/Debian/etc. and FreeBSD to work well, for 10 years or more of updates. (And I'd expect most games to work on Linux with Proton.)


Which is exactly the point I am making.

This is fascinating. I always assumed the susceptibility to fork bombs was an inevitable consequence of the Unix process model optimizing for speed of fork.

Do you know why/how BSD handles it better?


I can't really speak to what FreeBSD is (or was?) doing special, but even on Linux these days with proper ulimits, fork bombs are pretty far from the disaster they once were.

If I recall correctly, a certain amount of CPU, memory and processes has been reserved for root for a long time on FreeBSD. This would prevent the from bomb from exhausting all resources.

Love seeing all this FreeBSD press!

Maybe people will give it a try and hopefully Linux developers will once again start believing portability is a good thing :)


I'm glad to see a FreeBSD user welcoming others to try the OS. I always see FreeBSD users shooing others away from the OS, it's really disheartening.

I like FreeBSD but I had serious issues that didn't occur in Linux.

I had a Supermicro server running FreeBSD. After about a month of operating I would run into an issue where the network interface (e1000) would cease working due to mbuf exhaustion after about a month of operation. I submitted a bug report to Bugzilla but never got to the bottom of the issue. I later upgraded to another Supermicro server that was a couple of generations newer but still had an Intel e1000 NIC and the same issue persisted. Again submitted a bug report but the issue was never fixed and never got to the bottom of it. It was hard to also troubleshoot because the network drops would happen after about a month, so it was hard to reproduce.

Fed up, I switched to Linux and never had these issues. There's a lot of issues on bugzilla with e1000 related to mbuf issues, so my guess is its just a low quality driver issue.


FreeBSD is a cool OS, especially as a work machine. Once, I almost joined a company where my first assignment was to install FreeBSD on my work computer. It worked really well, and I actually liked using xfce. What a time! I was young, the grass was green, and the skies were blue.

Typing “man $something” and getting actual good documentation rather than “use infodoc you uncultured swine” was always a bonus too.

Back when such things were my deal, the FreeBSD docs were a breath of fresh air. It was like the whole platform was designed intentionally rather than the pile of cobbled together components that most Linux distros felt like.


>“use infodoc you uncultured swine”

Quote of the year. I see you hate info almost as much as I do.


Ha yes let me just agree with you both that info is trash. It's the GNU way to make things unnecessarily difficult. If it was easy then any commoner could do it. By making things difficult they ensure that only the most dedicated acolytes can succeed, and everyone else is unworthy and pitiable.

man should just handle info transparently.

Are the (non-Nvidia) GPU drivers still years behind mainline Linux? I might be misinterpreting the release scheme, but it seems like FreeBSD 14's drivers correspond to Linux 5.15 and FreeBSD 15's will correspond to at least Linux 6.1. Is that right? 5.15 should be new enough to have decent support for my GPU (which "worked" out of the box on Linux but didn't really stabilize until 5.12 or so).

You can install drm-6.1:

https://www.freshports.org/graphics/drm-61-kmod/

It even in the quarterly repo.


Thanks. I think I was somehow looking at an outdated description for drm-61-kmod that said it was only for -CURRENT, and only found mentions of the needed linuxkpi changes possibly being merged into 14-STABLE in the future. Judging by the drm-kmod git repo, it looks like they're currently working on bringing it up to 6.6.

As a fedora user, why would I consider FreeBSD? I don't know enough about the differences. All I know is that FreeBSD is currently behind on features and tool versions

I find the BSDs, in general, take a more holistic approach to the operating design and everything feels very cohesive. In contrast, Linux feels more like an assembly of parts to form a unit and everything feels far more disjointed. That said, I run Linux on my production workstation because it supports more modern stuff. However, OpenBSD is one of my favorite operating systems to put on the back end because of its very simple and consistent design, and, well, strong focus on security.

Exactly. The reason why I'm a fan of the BSDs in general is because of the cohesion of the base system, not to mention the high quality of its documentation and source code. I tend to prefer cleaner, cohesive systems that seem "designed" (System 7 Unix, the BSDs, Plan 9, C, NeXT and early Mac OS X, Smalltalk, many functional programming languages like Scheme and Standard ML) to large, complex systems that seem "evolved" (Windows, Linux, C++, JavaScript, the Web in general). I also like the conservative, deliberate approach that the BSDs take when it comes to the inclusion of new features. I remember reading a FreeBSD guide about 20 years ago that said something to the effect of "BSD is what you get when Unix hackers make a Unix for a PC, while Linux is what you get when PC hackers make a Unix for a PC." The spirit of that quote is that the BSDs tend to adhere to the Unix philosophy and thus their feature additions are in line with the philosophy of the overall system. The consequence of this, though, is that the BSDs are slower to adopt new technologies compared to Linux, though there is, in my opinion, a tendency in the Linux ecosystem for new technologies to be pushed before they are 100% ready, and the Linux ecosystem, as you said, feels more like an assembly of parts, each with their own design philosophies, rather than a cohesive system. Linux is certainly good, but I personally find FreeBSD more pleasant.

With that said, I use FreeBSD for my home server and also inside VMs, but I find myself using Linux more. There are many situations where I often need to use Linux instead of FreeBSD due to either software compatibility reasons or lack of drivers.


Thank you for this thoughtful explanation. I’ve been thinking a lot lately about this and your post convinced me that FreeBSD with virtualisation for occasional use of linux software is the right choice for me.

I hear this claim about security repeated a lot but not everyone agrees[0]. Always interested in hearing perspectives from actual users though. What do you like about their focus on security?

[0] https://isopenbsdsecu.re/about/


There's a lot of defense in depth approaches in OpenBSD, and as someone who's been on the mailing list for quite some time, I get to see them in real time. https://isopenbsdsecu.re/mitigations/ does break them down fairly well, perhaps a bit pessimistically, but, if you take time to read through this, you can still see a lot of innovation coming from OpenBSD, and often before others.

The main benefit for me is that it provides a very stable user experience since it is not under the influence of the war between linux distros; you learn the system once and you might spend 5 minutes after a major update learning what is new and configuring. But much of that software in ports is developed for linux with no consideration for BSD so it can cause headaches since the maintainers of those ports can not possibly test every possible use case and generally port it for their own case. A big rub for me is the sound situation, I love OSS but not all programs support it so I still get stuck using Jack.

I almost made the switch to FreeBSD a few times but Slackware still offers fewer compromises for me with the same ridiculously stable user experience and I don't have to worry as much about drivers when computer shopping. I assume I will end up switching to FreeBSD when Patrick dies since Slackware will probably die with him so I keep an eye on it and play with it once every year or two.


> As a fedora user, why would I consider FreeBSD?

The vid talks about how big Linux vendor, like Red Hat, betrayed the Linux community (their words, not mine).

If you're fine with the "microsoftization" of Linux, then you're all good and set with Fedora or Ubuntu.

For many users Linux is just "Windows but sucking a bit less than Windows".

But others do feel the betrayal they talk about in the vid. For me for example systemd and systemd's author now officially being on Microsoft' payroll is a very hard pill to swallow. Same for many non-portable things now targeting only the bastardized Linux ecosystem, instead of targeting all the Unixes still out there (including FreeBSD and OpenBSD).

Thankfully due to the unfathomably big number of Linux containers / virtual machines being spun on and off and the need for utmost speed of these, systemd ain't much of a thing in the Linux container world. And Linux is still the kernel and it's still possible to have both systemd-less containers and systemd-less distros. I'm not sure how long that'll last though seen how systemd is spreading its tentacles everywhere.

For people who love Microsoft INI files and who love the rube-goldberg monstrosity that Windows is, systemd Linux distros with snap and whatnots are just fine. To them Linux is just basically a Windows a tiny bit more secure and crashing a tiny bit less. And don't worry: Microsoft employees are hard at work making sure Linux gets shittier by the day, emulating the mistakes of the biggest turd of an OS ever made (that'd be Windows).

For others, thankfully the BSDs do still exists.


You're unlikely to convert anyone with that kind of attitude and these massive exaggerations, which are obvious to anyone who knows their linuxen. Some BSD advocates are like sandpaper, unfortunately, which is not helping the OSes, which often get defined in terms of what they're not.

Unlikely to convert anyone, but they are not wrong either.

I don't use BSD, but as a long time user of Linux (started with Yggdrasil) I can't help but think Linux is slowly but surely getting sabotaged. Systemd, Wayland, Pulseaudio, it is all needlessly complicated and introduces dependencies in other software that shouldn't be there.

Maybe I _should_ take a good look at the BSD's after all.


Go pair a Bluetooth headset with your Machine, then we can talk about needless complexities.

There’s also Void, Alpine and Guix if you don’t want to use systemd.

What I personally really like about the BSDs are that they are very hackable with great documentation. The code base is much smaller and building your own kernel is very straightforward. I was able to even fix some of my own drivers and learnt a ton in the process.


> There’s also Void [...]

Started[0] by NetBSDs (and Hacker News') own jmmv[1]. So if you're getting BSD vibes, now you know why.

[0] https://en.wikipedia.org/wiki/Void_Linux?#History

[1] https://jmmv.dev/software/netbsd.html


Heh, not quite! Void Linux was started by the _other_ NetBSD developer from Spain: xtraeme.

D’oh!


No real reason to as an end user. Maybe better ZFS integration out of the box is appealing for a NAS or something like that. But the desktop user experience on FreeBSD is not great. Lots of regressions in things you might care about (wifi, kde/gnome, chrome web browser) relative to Linux.

Seeing this kind of attitude in the Linux community saddens me. We should remember that Linux too has been small, and incomplete, and difficult— and it still is at least some of those things within the wider desktop world. So are a great many Linux distros, including fabulous ones that should not be overlooked.

I hope that the Linux community will long retain at least some echo of that exploratory spirit, and extend that to projects like FreeBSD.


I tried FreeBSD for a few months about 15 years ago. I liked it. Clean filesystem and just "felt" better on a few levels. But the reason I started using Linux 25 years ago was 100% for the philosophy of the GPL and because of that, I never felt comfortable with myself using FreeBSD. I have suggested it to many people over the years, I think it's a great OS, just not for me.

> I hope that the Linux community will long retain at least some echo of that exploratory spirit, and extend that to projects like FreeBSD.

In that exploratory spirit, I ran FreeBSD for years. It has a number of every-day shortcomings compared to Linux. If Linux users want to be annoyed and inconvenienced regularly in the spirit of exploration, sure, they can give it a shot.


Did you actually use it for desktop? Yes it has some regressions and rough edges, but it has very nice release cycle for packages - quarterly (much like ubuntu but twice as fast), and separate schedule for the base system; the makes borking OS more difficult. Packages are fresh, security updates frequents, what not to like?

Hardware support is abysmal though.


> Did you actually use it for desktop?

Yes.


I personally use it frequently in a VM, and I find it nicer than Ubuntu as I get fresh packages, without risk of borking os itself, ass base and packages separate. Other than that, chrome/kde works about same.

What sort of regressions are there in KDE and Chrome?

A variety of things don't work or break frequently. Google does not support Chrome on BSD at all and refuses to upstream any BSD support patches in chromium, so ports maintainers struggle to re-port new chromium releases to BSD (there is a giant stack of patches that keeps growing bigger). Updates lag upstream, often by a long time. Chrome's core security sandboxing features are broken on BSD (it just runs un-sandboxed!), which is kind of a major issue that no one talks about.

Firefox has always worked well for me on FreeBSD and OpenSolaris derivatives. I get why some people might prefer Chrome but I’d have thought Firefox would have aligned better with ideals of the average BSD user. Interesting to know that Google are rejecting BSD patches; that’s a great pity.

What about desktop environments though? I always thought KDE and GNOME were first class citizens on FreeBSD.


Is chrome a web requirement these days? I'd say use Firefox and be done with it.

Lots of people seem to prefer Chrome to Firefox, possibly some for good reasons: https://www.oberlo.com/statistics/browser-market-share

Firefox may work better on FreeBSD, or not -- I don't have as much personal experience with it. (It's not like there are a huge number of BSD Firefox developers, either.)


> possibly some for good reasons

Can you help me? I didn't find any in that article. Maybe I missed in the flood of term 'market share'.


> you might care about (wifi, kde/gnome, chrome web browser)

It is 2024. I do not care about the browser functionality for ~15 years.


For my use cases (a stable environment for writing and running systems code locally, browsing the internet, reading pdfs, etc), desktop Linux peaked about ten years ago.

That was back before systemd/wayland, and back when deleting pulseaudio just made everything work better.

Also, minimal window managers like evilwm were more tenable, since the only useful thing that really used the notification area/dbus was wifi.

Anyway, being behind on the spiral of instability I’ve seen with recent Linux desktop environments seems like a feature, not a bug.


As a fedora user you probably shouldn't consider FreeBSD, it's more for servers than desktop systems. E.g. I run it on my laptop even though I can't adjust the brightness of the monitor.

For me being "behind on features and tool versions" actually means that there's much less going on so I'm more confident that everything works and works well together. From my POV Linux has developed a case of Winchester Mystery House syndrome.


Have you tried the backlight[0] utility they added to the base system? None of the sysctls I've found have worked at adjusting my laptop's backlight but the backlight utility itself succeeds for me (on an AMD framework laptop).

[0] https://man.freebsd.org/cgi/man.cgi?backlight


I haven't, thanks for the tip! :D

> behind [..] tool versions

I run both Arch Linux and FreeBSD. It is not uncommon that FreeBSD's packages update faster than Arch Linux. Make sure you update your pkg config to use the latest packages instead of the quarterly packages it uses by default.

Also, I'd like to point out that FreeBSD has thousands of more packages than Fedora: https://repology.org/repositories/statistics/newest

> why would I consider FreeBSD

ZFS: Since FreeBSD isn't encumbered by the GPL, it has fully integrated ZFS which is a far better experience than on Linux. On FreeBSD ZFS always works, whereas on Linux ZFS is an out-of-tree module and your dkms builds breaks frequently when the kernel updates. Also, a lot of software on FreeBSD takes advantage of the features of ZFS, whereas on Linux most software doesn't use the features of either btrfs or ZFS.

PF: This firewall has a great config format. After using PF, Linux's iptables makes me want to walk into the ocean.

poudriere: A great and easy-to-use package builder. I use this to build both my OS and all my software with CPU optimizations for my specific processor (but FreeBSD has official package repositories, so you don't need to build your own if you don't want to.)

kqueue: FreeBSD uses the kqeueue syscall. Later Linux created their own syscall: epoll. But epoll is fundamentally broken: https://idea.popcount.org/2017-02-20-epoll-is-fundamentally-...

jails: more secure than Linux containers despite being invented 7 years earlier.

sysctl instead of /proc: On FreeBSD, when you're listing the running processes (for example, top, htop, or ps), it uses sysctl which gets an atomic snapshot of the running processes. On Linux, you have to crawl through the /proc filesystem which is MANY more syscalls and the contents of /proc are changing out from under you while you're crawling through it.

-----

That being said, Linux has some wins over FreeBSD:

systemd: As controversial as it is, I think systemd is nicer than FreeBSD's init system. systemd supports user services whereas the built-in FreeBSD service manager does not (3rd party ones do though). Systemd automatically captures stdout/stderr to a log whereas FreeBSD relies on each service invoking the daemon tool to redirect their stdout/stderr. FreeBSD still uses pidfiles for everything which is flawed.

documentation: FreeBSD has much better man pages than Linux, but the Arch Linux wiki is the champion, no contest.

wifi: FreeBSD's wifi support is definitely not great. There are efforts under way to make a shim that will allow FreeBSD to use the Linux wifi drivers (similar to what they did for graphics drivers) but where it stands today, the wifi support is not great. That being said, there is a package called "wifibox" that spins up a tiny Linux VM and has Linux drive your wifi card, bridging the connection back to FreeBSD.

------

Finally, this is a popular blog post on why someone would choose FreeBSD over Linux: <go see Vermaden's post at https://news.ycombinator.com/item?id=41820161 >

Edit: Vermaden himself has posted the link to his blog post at https://news.ycombinator.com/item?id=41820161 so I am removing the link.


These days, iptables is often just a wrapper around nftables. Familiarize yourself with it if/when you have the time, you might actually like it. It uses a declarative approach similar to pf et al., and uses the same set of rules for ipv4 and ipv6.

https://wiki.archlinux.org/title/Nftables


There are a lot of things that Linux does better, hardware support, tooling ( for devs ) even the things that used to be good on BSD are more modern on Linux namely firewall, security, containers / virtualization etc ...

Even ebpf is superior to dtrace.

It's not even a fair comparison because the world runs on linux, all the tech company heavily use Linux so there a vast amount of money poured into it.

As for ZFS I've been using it on Ubuntu on my NAS which is 10 years old with 0 issues, never had a single issue.


> more modern on Linux namely firewall, security, containers / virtualization

I disagree. FreeBSD has pf which is the superior firewall (as does OpenBSD and OSX). FreeBSD has jails which are the superior containers, and bhyve for virtualization (also ported to OSX as xhyve) which is wonderful because it doesn't support any sort of legacy devices like floppy disks which have lead to security vulns in qemu. In terms of security, since you used the term "BSD" I am going to include OpenBSD in this comparison, which is the obvious champion of security.

> As for ZFS I've been using it on Ubuntu on my NAS which is 10 years old with 0 issues, never had a single issue.

That's because Canonical decided to ignore the license issues and bundle ZFS with Linux. Every other distro honors the license: https://ubuntu.com/blog/zfs-licensing-and-linux


>All I know is that FreeBSD is currently behind on features and tool versions

Well, I don't want to be that guy, but you're wrong about that too ;)




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

Search: