135 points · by gravitate · 4y ago · 171 comments
This is uncontexualized hype clearly written by someone with no real world experience, hoping to gaslight users into thinking their current system is insecure. Then I scroll up and noticed the article is written by a company who sell presumably consulting services in unix. Go figure.
Failing that, there’s limited reasons to use BSD systems instead of Linux unless you have highly specialised requirements. Under many cases I’d imagine it would be more expensive in terms of effort required to hire/train skilled staff.
Basically I ended up using the Freebsd box as a fileserver (ZFS and Minio), and still running an Alpine Linux box with zfs for most other things.
I did briefly run a Minecraft server on the Freebsd box which worked really well.
Virtual network for a bunch of jails with nat. I wanted exposed ports on the host machine mapped to a reverse proxy jail that did tls termination before forwarding to other jails on a virtual network (while allowing the jails on the virtual net outgoing internet access).
Several applications that were apparently built for Linux, so they did not compile on Freebsd (and no alternatives available).
Getting newer versions of software. Often the version available in pkg is several major versions out of date.
Documentation for how to do things in general. Yeah when there are docs/tutorials they can often be of high quality, but frequently there is just nothing or the available docs does not cover the edge case you are trying to solve.
I mean, https://nvd.nist.gov/vuln/detail/CVE-2022-43995 is lest than a week old, so probably yes. (That is, a lot of systems haven't been updated and have a nice open CVE that wouldn't be there if they weren't using sudo.)
Furthermore, there would be no vulnerabilities if you just unplug your computer and walk away, at some point you need to make usability and risk compromises.
Furthermore, the UNIX user model and file system hierarchy already provides you with RBAC. Combine that with ACLs and SetUID (et al) bits and you’ve already got sudo baked into the core system.
Your point about it being a convenience tool is bang on: it makes it easier to administer all of the above but that convenience, like nearly all convenience tools in computing, comes with a slight security trade off.
To be clear, I don’t agree with the author’s recommendation to ditch sudo. But they are absolutely correct in the technical sense. Just as you are. In fact you are both basically arguing the same point but from different perspectives: “sudo adds a vector of attack”. It’s then up to your threat modelling to decide if that is appropriate or not.
But to come back to my original point: just don’t give people shell access. There’s no need in 99% of cases of servers these days and if we are talking about local user machines, then RBAC is less of an issue since it would be a machine per user.
Some folks kind of are; for instance, last time I looked Arch Linux has sudo as part of base so it's hard to remove.
Edit: Sorry, apparently Arch does let you remove sudo (now?). If you substitute in RHEL et al. the general point stands (and I actually checked this time and Rocky 8 makes unhappy noises if you ask it to remove sudo), but my initial example was wrong.
$ yay -Rsn sudo
checking dependencies...
:: libisoburn optionally requires sudo: for use with xorriso-dd-target
:: pacman-contrib optionally requires sudo: privilege elevation for several scripts
:: refind optionally requires sudo: for privilege elevation in refind-install and refind-mkdefault
:: wireguard-tools optionally requires sudo: elevate privileges
:: yay optionally requires sudo: privilege elevation
Package (1) Old Version Net Change
sudo 1.9.12.p1-1 -7.10 MiB
Total Removed Size: 7.10 MiB
:: Do you want to remove these packages? [Y/n]
:: Processing package changes...
(1/1) removing sudo [###############################################] 100%
:: Running post-transaction hooks...
(1/2) Reloading system manager configuration...
(2/2) Arming ConditionNeedsUpdate...
libisoburn, refind, wg, yay can be elevated by doas or su.pacman-contrib is a bunch of package development scripts. Your typical user won't have them. Also the previous point applies.
Looks like nothing else in core depends on sudo, most packages from extra/community that need it have it as an optional dependency, looks like one can remove sudo on Arch
Arch's base is really minimalist, though.
And yet just a few days ago there was a thread about sudo's recent heap-overflow issue, where the top comment's first line is:
> Sudo must be the program with the largest number of buffer overflows I’ve heard about.
* https://news.ycombinator.com/item?id=33465707#unv_33467000
Aside from what the problems and benefits of sudo may or may not be, bringing up sudo in a "BSD vs. Linux" debate is a red herring: it's just completely unrelated.
I'd expect you'd need more training for Linux, since it changes more often.
During this time frame we've also migrated our last FreeBSD servers to Ubuntu
Except for the giant, buggy change in the auto-install process in 20.04:
* https://utcc.utoronto.ca/~cks/space/blog/linux/Ubuntu2004Aut...
You know, I actually set this comment aside because I was curious about how HN would engage with it. So far, it seems like folks are pointing out that there indeed have been changes in certain aspects of the OS, as well as probably the introduction of the whole snap mechanism.
Regardless, to me Ubuntu LTS seems like one of the better OS distros out there, both for desktop and server use. It's not ideal, but it's good enough in most respects, to the point where it's hard to recommend anything else.
Previously I recall many looking in the direction of CentOS as something to install on servers and have it serve them for a long time with security updates and pretty good stability, but I guess now one would have to count on Rocky Linux and Alma Linux for that. Additionally, I have to admit that some of the choices that RPM distros make can be a bit odd and the software support isn't where I'd like it to be, things like Docker were admittedly broken (DNS resolution, firewall masquerades and other oddness with SELinux) for a while. It feels like they have their own enterprise-focused way of doing everything, OpenShift being an example of this.
On the other hand, there's Debian and Ubuntu. Personally, I might even like Debian better, but Ubuntu's LTS lifecycle is far more worry free. You might not get 10 years of support, but setting up something and running it for 5 years (with security and other updates) is pretty freeing, especially when you're primarily interested in just keeping things running in a stable manner and don't always need the latest packages. There are changes, of course, there are packages that change names, that break or are deprecated, sometimes you get other growing pains that all of the OSes out there need to deal with.
But Ubuntu LTS to me feels like it's good enough for both server use in both development/testing/prod, as well as personal use, as a daily driver.
I actually will stand by that statement, recently I moved to building all of my container images on Ubuntu as a base: https://blog.kronis.dev/articles/using-ubuntu-as-the-base-fo...
I also experimented with running an offshoot of it, Linux Mint, on the desktop (because their XFCE spin is great): https://blog.kronis.dev/articles/a-week-of-linux-instead-of-...
And nowadays I'm considering migrating my Debian servers after the EOL to Ubuntu, my new ones already running it.
I will say that every distro has its place and in certain domains there are better options than Ubuntu, of course, and OSes like the *BSDs have consistency and engineering that Linux cannot quite match (due to the "engineered vs grown" approach to building them), but sometimes you just want something that is simple to run, has ample tutorials and resources, and won't make you chase down odd issues.
Linux wins in terms of market share which makes it appear easier (eg more software support, bore install guides, etc). But if you look at the base OS itself, FreeBSD is a lot more consistent to manage.
I think it’s a great pity FreeBSD doesn’t get more traction to be honest with you. I have no major qualms with Linux on the whole but FreeBSD is a really nice platform to work on too.
A how-to for FreeBSD can be used with NetBSD with minimal changes. Why? Because the BSDs don't expend effort to deliberately try to differentiate themselves from each other. They're consistent and don't change gratuitously.
Try writing a how-to that has even the slightest consistency between the common Linux distros - Red Hat, Ubuntu, Debian, Arch. Heck - many how-tos written for Ubuntu 18 can't be used with newer Ubuntu! It's a mess.
However, when using a system without a GUI, e.g. for a networking or storage server, in most cases FreeBSD is definitely much easier to use than Linux.
There are a huge number of small details that matter. Even for something as simple as seeing the status of the network interfaces. If I type "ifconfig" without arguments on FreeBSD, it shows everything that I want to know, about all network interfaces. To obtain the same information on a Linux system, I have to type a large number of "ip" commands, each with many arguments that I fail to remember even after decades of using "ip", so I may need to consult the "man" page for "ip". (The legacy ifconfig of Linux does not provide the functionality of FreeBSD ifconfig)
In general, for any network-related task, using ifconfig and ipfw on FreeBSD is much easier than using ip and iptables on Linux.
There also many more niche applications where there are big differences. For example the "mt" command for magnetic tape control sucks badly on Linux, but it is very convenient on FreeBSD. Also for SCSI devices FreeBSD has more flexible commands.
While audio seems to be improving on Linux with things like pipewire, for a long time audio was in many cases easier to configure on FreeBSD than on Linux with the dreaded ALSA or pulseaudio, if the audio hardware was supported. Also, when I had to configure once some USB surveillance cameras, that was easier on FreeBSD with webcamd, than on Linux, but like for audio, FreeBSD has a shorter list of supported devices.
Some of the differences in the user interface between FreeBSD and Linux are caused by FreeBSD being more conservative, while in Linux some older tools have been replaced with newer tools, but the newer tools have been made with worse user interfaces, like in the replacement of ifconfig with ip, or in the introduction of ALSA and pulseaudio, which both have an extremely poor user interface, especially for computers with multiple audio devices.
Not even mentioning nowdays Linux is largely just layer to run docker and noone cares on learning things beyond docker-compose and docker files.
So typical for BSD fans, find a single flaw then try overblow it and show how their flavour of *BSD is better. It's frankly tiring at this point.
Please don’t make generalisations about peoples character.
I don't use *Nix for the desktop but I would love to find out that FreeBSD allows me to run Kubernetes, Elastic Search, Redis. That I can achieve more throughput with FreeBSD, that Postgres and MongoDB are more performant than on Linux and that the system is more reliable than Linux.
How ls and grep works on FreeBSD is no concern of mine. But running Docker is.
Some other whys for FreeBSD here:
Which I happen to know. But it was an example. If I am going to switch to FreeBSD it has to run the software I need, not to merely provide alternatives. And it has to do it better.
Saying that FreeBSD has jails as an alternative is akin to saying Linux has Gimp as an alternative to Photoshop. Not many are going to switch operating systems to use Gimp instead of Photoshop.
Just like with your Photoshop (or Lightroom) example - if you need to run one - you use macOS or Windows for that - Linux also not possible here.
Correct, K8s and Docker will only work one single platform, namely Linux and Windows. No, wait, that's two. K8s and Docker can only possibly run on these two platforms: Linux, Windows and macOS. Ok, let me start over. The three platforms that support K8s and Docker are Linux, Windows, macOS and Oracle Solaris[1]. That's not... ok, the FOUR and ONLY four platforms that can run K8s and Docker are Linux, Windows, macOS, Illumos[2], Solaris, SmartOS, and FreeBSD.[3] How many did I say?
K8s and Docker run anywhere someone is driven to make them run.
[1] https://medium.com/@norlin.t/port-of-kubernetes-v1-24-0-for-...
[2] https://illumos.org/docs/about/features/ "LX-branded zones provide the Linux system call interface, allowing you to run most Linux application binaries without recompiling them for illumos. This facility is available in several illumos distributions, including SmartOS and OmniOS."
[3] https://yom.iaelu.net/2020/05/freebsd-using-docker-and-kuber...
https://docs.freebsd.org/en/books/handbook/jails/
I have used jails, though a slightly harder to set up, once setup it works great. I used it to open up ssh to an empty jail as a kind of file server. Mainly to sftp files to that I change on my laptop at a remote site. This is in the days before the "cloud".
I am always mystified why FreeBSD and Jails never took off as "the" cloud environment.
Those could be part of why it's not as popular.
If you run your own servers, especially ones that you physically have to maintain the hardware on, FreeBSD is a very reliable choice and the upgrade paths on it are fantastic. I now run some services in Azure and use docker, but all my "on prem" stuff, is still freeBSD powered.
As someone who would like to switch to FreeBSD but cannot, let me give you a few counterpoints. I also loosely follow actual fashion trends in clothing.
I actually think that FreeBSD is already fashionable. It scaled up WhatsApp and Netflix, two of the most impressive startups! Tarsnap uses it. It seems pretty stable, and I would be perfectly fine adopting it.
Where would I adopt FreeBSD? In two places – on the desktop/laptop, and on the server.
On the desktop/laptop: I need perfect screen resolution on my laptop and external monitor, Bluetooth and Wi-Fi, and a way to correctly use my plugged-in microphone and headphones. Ubuntu delivers all of this with some grumbling, and MacOS and Windows do it flawlessly. What does FreeBSD do? Reports seem to say that Wi-Fi and Bluetooth are problematic.
On the server: I need a compelling way to manage thousands of servers if needed, and something like Ansible won't cut it. For whatever reason, distributed systems on top of FreeBSD seems to be something that the community refuses to build on. I'm not sure what kinds of frameworks WhatsApp and Netflix built to manage their servers, but none of it seems to be public.
So, I kind of disagree; I think FreeBSD is fashionable but fails to be utilitarian enough. Fix the problems on the desktop/laptop; or deliver a way of showing how to scale up quickly with FreeBSD, and you'll get your adoption.
For config management all of the usual suspects should work and all will be painful to scale in non-FreeBSD specific ways. The Opscode related nightmares finally subsided sometime during the pandemic. Was there a specific package you had trouble with?
I have no idea why the hardware/software industry all focused on the linux kernel as the common base for so many hardware support. The amount of chips supported in the linux kernel is mind boggling.
I worked with FreeBSD in my early career. How do I miss the `make world`. So easy, all-in-one, clean and elegant system.
Everybody runs Linux because it's free, there is no danger of closed private forks gaining any traction, there is no danger of it playing MongoDB. So everyone can safely pick it and invest into it. The pace of progress is very high because of that, and anything broken would be fixed very-very soon.
Because of that ability to rely on Linux being a common thing that nobody can privatize, huge companies like Red Hat and Canonical could form, and entities like IBM, Oracle, Intel, Google, etc could keep investing in the development.
All the above is sort of problematic with FreeBSD. It's too cathedral on one side, and has too few strings attached to hold to it on the other side. So it remains the choice of connoisseurs who need its particular technical brilliance (e.g. the network stack) or its very permissive license (see PlayStation).
I'll die mad about it.
So many in the OSS community applaud vendors for upstreaming a driver to the Linux kernel even though they haven't given any basic form of documentation. Not only is this a massive pain if you happen to work on a project that isn't GPL compatible (back to square one, legally required to clean room implement the algorithm if you want to work with Linux source), but you still have no idea how the device actually works and what the sharp edges are (good luck writing bug fixes!). It's utterly baffling that people have generally accepted Linux as if it is the only FOSS kernel that anyone should ever care about.
Example #2124 out of 251295912931, BSD devs were absolutely hardcore adamant to stick to CVS and SVN as their source control for years after the rest of the world has moved on.
They've always been fine for me, and sound is more reliable than Linux. What went wrong for you?
I'm not sure what you've tried that does not work!
What is needed but is sort of missing:
- A way to run containers. I see that *BSD may have had container-like features (e.g. jails) long before Linux containers existed. The truth us that the prevailing format is Linux-style containers. Ideally one should be able to run ready-made containers in Linux compatibility mode. An ability to build a native container from a Dockerfile is as important.
- An orchestration engine based around containers. Ideally a port of a subset of k8s, but smaller tools the class of Nomad or Docker Swarm would be a good start.
- A good replacement for Docker / Podman / Containerd, preferably with a modicum of compatibility / convertibility from those. You want an easy local development environment.
I bet bits and pieces of it sort of kind of exist, and the kernel is capable enough. Now someone should put (quite) some effort in building that for real, releasing under a reasonable open license, and maintaining it for years.
This is to say nothing of (desktop /laptop) hardware compatibility yet.
Today its a different story. FreeBSD is cool, and you will learn more about Linux by learning FreeBSD and it works really well.
However I am currently moving my last system away from FreeBSD. It is just that, Linux/Centos is better, and easier to maintain. Especially third-party packages. There are other things like Linux has support for NVMe-oF which I use together with ZFS on Linux. Applications, especially databases has often 1x-2x better performance. Virtualization is better and more performant. Better NUMA.
Edit: I forgot about Project Trident. They migrated away from FreeBSD to Void Linux with ZFSBootMenu. They did actually support root-on-ZFS through their installer. They gave up after about 18 months, they weren't able to differentiate enough after they stopped being based on FreeBSD.
I remember the disappointment after PC-BSD died and Project Trident invested their 'time' into Void Linux instead of FreeBSD ... then I thought that it actually my be a good move - so finally some Linux would have some ZFS and ZFS Boot Environments love - especially as these people used ZFS Boot Environments on FreeBSD earlier ... and then it all died.
A lot of potential killed/lost there. First - PC-BSD introduced PBI packages - something that is today known on Linux as SNAP for example - some application packed together with libraries and dependencies in one 'package' - then for some reason they killed this idea - while Linux 'reinvented' it as SNAP (and others) and 'The World' was (and sometimes still) is fascinated by it. Sick. Same with Docker that was introduced in 2013. The so called 'World' went crazy with 'containers everywhere' ideology while FreeBSD Jails were available 13 years later since 2000. Sometimes I just got the idea that Linux people do not see any other innovations other then that happened with Linux system. Like FreeBSD Jails or Solaris Zones or IBM WPARs or HP-UX nPars never existed ...
But in the end the rewrite was better for everyone. Ars has a good writeup: https://arstechnica.com/gadgets/2021/03/buffer-overruns-lice...
As far as I know it's been merged back into the mainline kernel now.
For a desktop X is core functionality.
SystemD and k8s catalyzed my decision.
I dont want k8s to be my OS. And SystemD is not the linux I remember falling in love with.
I am not mad at Linux, but monoliths at the 10M LoC order always need competition. Otherwise we have a major source of unchecked complexity growth with no escape.
> On Linux systems, it is very common to use sudo for operations that require root permissions
Not common unless authors used Ubuntu desktop, which pushed sudo usage to the extremes. I don't even have it installed. However, frequent sudo usage usually indicates something is wrong with how you use the system, maybe account permissions or lack of knowledge of how to use it properly.
whats wrong with it in your opinion?
On the other hand, I have seen excessive sudo usage only in Ubuntu and some Debian/Arch docs. Maybe, this is the reasoning behind their comment that sudo is frequently used.
<joke> Also, you can easily spot Ubuntu users: they'll type almost any command with sudo :D </joke>
Ubuntu, and Fedora and RHEL et al., and SUSE. Most of the big players prefer sudo.
However, on a laptop and used as a graphical workstation, it can be painful. I'd love to see a hardware vendor (e.g., like System76) bring out a pre-packaged FreeBSD laptop. I think a lot of people in the *nix community would jump on that, myself included.
I find it interesting that the Linux programs lspci, lsusb etc have ended up with arguably more consistent naming than the BSD equivalents pciconf and usbconfig.
# lspci
00:00.0 Host bridge: Intel Corporation 2nd Generation Core Processor Family DRAM Controller (rev 09)
00:02.0 VGA compatible controller: Intel Corporation 2nd Generation Core Processor Family Integrated Graphics Controller (rev 09)
00:16.0 Communication controller: Intel Corporation 6 Series/C200 Series Chipset Family MEI Controller #1 (rev 04)
00:19.0 Ethernet controller: Intel Corporation 82579LM Gigabit Network Connection (Lewisville) (rev 04)
00:1a.0 USB controller: Intel Corporation 6 Series/C200 Series Chipset Family USB Enhanced Host Controller #2 (rev 04)
00:1b.0 Audio device: Intel Corporation 6 Series/C200 Series Chipset Family High Definition Audio Controller (rev 04)
00:1c.0 PCI bridge: Intel Corporation 6 Series/C200 Series Chipset Family PCI Express Root Port 1 (rev b4)
00:1c.1 PCI bridge: Intel Corporation 6 Series/C200 Series Chipset Family PCI Express Root Port 2 (rev b4)
00:1c.4 PCI bridge: Intel Corporation 6 Series/C200 Series Chipset Family PCI Express Root Port 5 (rev b4)
00:1c.6 PCI bridge: Intel Corporation 6 Series/C200 Series Chipset Family PCI Express Root Port 7 (rev b4)
00:1d.0 USB controller: Intel Corporation 6 Series/C200 Series Chipset Family USB Enhanced Host Controller #1 (rev 04)
00:1f.0 ISA bridge: Intel Corporation QM67 Express Chipset LPC Controller (rev 04)
00:1f.2 SATA controller: Intel Corporation 6 Series/C200 Series Chipset Family 6 port Mobile SATA AHCI Controller (rev 04)
00:1f.3 SMBus: Intel Corporation 6 Series/C200 Series Chipset Family SMBus Controller (rev 04)
03:00.0 Network controller: Intel Corporation Centrino Ultimate-N 6300 (rev 3e)
0d:00.0 System peripheral: Ricoh Co Ltd PCIe SDXC/MMC Host Controller (rev 08)
0e:00.0 USB controller: NEC Corporation uPD720200 USB 3.0 Host Controller (rev 04)
# lsusb
Bus /dev/usb Device /dev/ugen0.3: ID 046d:c52b Logitech, Inc. Unifying Receiver
Bus /dev/usb Device /dev/ugen0.4: ID 04f2:b217 Chicony Electronics Co., Ltd Lenovo Integrated Camera (0.3MP)
Bus /dev/usb Device /dev/ugen2.2: ID 8087:0024 Intel Corp. Integrated Rate Matching Hub
Bus /dev/usb Device /dev/ugen0.2: ID 8087:0024 Intel Corp. Integrated Rate Matching Hub
Bus /dev/usb Device /dev/ugen0.1: ID 0000:0000
Bus /dev/usb Device /dev/ugen2.1: ID 0000:0000
Bus /dev/usb Device /dev/ugen1.1: ID 0000:0000
# uname -v
FreeBSD 13.1-RELEASE-p3 GENERICFor me, it is a prerequisite for using *BSD as a desktop OS, and what stopped me from migrating from Linux to *BSD last time.
Edit: Formatting
Source: Wikipedia
Also a stable OS but rolling packages is a great combo for me. Most Linux distros have everything rolling or fixed.
Google Chrome Passwords. For some reason you can't install Google Chrome on FreeBSD, you can install Chromium but all my saved passwords are stored in Google-Chrome, and you can't (it seems) port it !
So now I'm stucked with, Ok do I spend a day and move everything (manually) to Firefox/Chromium or do I just suck it up and stay where I am.
Yes yes I know there are many "solutions" how to store passwords, that is not the problem, the problem is PORTING my 100+ passwords/logins Ive gathered over the years to a new shiny solution.
- https://github.com/mrclksr/linux-browser-installer
It will just use FreeBSD Linux Binary Compatibility layer (not emulation).
FreeBSD supports most Linux syscalls with it so it can run unmodified Linux binaries 'just like that'.
More here:
- https://docs.freebsd.org/en/books/handbook/linuxemu/
Regards.