1. 1

    What are the main differences between OpenBSD and FreeBSD? I’ve been using FreeBSD for some time now and have had very few issues, although the Intel graphics driver dies every few weeks forcing a restart. That said, I need to upgrade to 11.1.

    1. 3

      They are very different. So you’d need to give a bit of context for that question.

      But maybe it’s worth mentioning how different they are. NetBSD and FreeBSD started out nearly 24 years ago. They developed into rather different directions, had very different focuses (and no, that’s not just NetBSD working on a toaster). Somewhat over ten years ago OpenBSD forked from NetBSD. Today both operating systems are very different from each other.

      One might say that code wanders between the project, which is true, but one has to keep in mind that this is also true for Linux and BSD. While this is harder, due to licensing, a lot of the developers still are willing to give permissions in regards to code. However, the kernel isn’t the most obvious thing to users anyway, in most cases, other than “which hardware” and “which file systems” are supported, but even there there is FUSE.

      In other words, they are about as different as two Unix derivatives can get, but also not more than that. They have a somewhat different community and culture, but also not more different than different open source operating systems.

      What you will notice is that OpenBSD is a bit slower and a bit more focused on simplicity. Even though the performance part depends a bit on use cases.

      I’d hugely suggest to try it out though. Like different programming languages it can extend your horizon. At least for me trying out the different BSDs back in 2005 and the following years did. They are all general purpose operating systems, so don’t be blended by the typical categorization of saying that OpenBSD is fast, NetBSD is portable and FreeBSD is performant and has a lot of divers (even though that’s probably more true for DragonFly BSD these days).

      What is rather amazing about all of them is how incredibly much each of them manages to get done, despite having a comparatively (compared to Linux) small amount of committers. They all have quite a few edges over other, similar projects, have research going on, while still remaining perfectly usable general purpose operating systems.

      1. 4

        Somewhat over ten years ago OpenBSD forked from NetBSD.

        Somewhat over ten years being over 20 years ago.

        1. 5

          look, for some of us, thirty years ago will always be the 70s.

      2. 2

        FreeBSD and OpenBSD are similar in that they’re both direct descendants of Unix, by way of 386BSD and 4.4BSD-Lite. Compared to Linux they are more conservative with design decisions, and have much better documentation quality.

        FreeBSD is the larger project. They have more manpower and more code. Personally I think of them as a more conservative Debian. Features include: ZFS support in the kernel, the bhyve hypervisor, a Linux binary compatibility layer, and support for Wine and Steam. Nvidia graphics cards are well-supported. They also care a lot about performance: their TCP/IP stack is one of the best, and they forked the pf firewall to add multicore support. They also have the largest ports tree. Netflix uses FreeBSD for many of their servers.

        OpenBSD is much more aggressive about simplicity of implementation. Dead or broken code is deleted from the tree. They’ve developed a reputation for security but it seems to derive from simplicity of implementation, which is their primary concern. When a legacy component seems broken, they’re not afraid to refactor or reimplement it: LibreSSL, doas, and pledge are all OpenBSD success stories. The vmm/vmd hypervisor is up-and-coming. While not as far along as bhyve, it is capable of running Linux guests. OpenBSD has also taken a hardline stance against blobs in the kernel, which means AMD (with the open-source radeon driver) is a better bet than Nvidia. OpenBSD is arguably the best BSD for laptops, assuming you have supported hardware.

        Capsicum vs Pledge is a great example of FreeBSD vs OpenBSD. Both projects attempt to achieve the same thing: restrict program permissions so they do less damage if misbehaving. Capsicum is a complex capabilities-based system which is very sophisticated and took years to write. Adjusting programs to use capsicum is usually hard work. In contrast, pledge is a simple privilege-dropping syscall developed in a few months. Adding pledge to a program is often just a 2-line diff. [Pledge slides]

        1. 1

          Lots of insights, but a few questions came up.

          OpenBSD is arguably the best BSD for laptops

          Why? One could argue that both DragonFly and MacOS might be better. But then it is for hardware reasons, which you seem to have excluded from that statement.

          Netflix uses FreeBSD for many of their servers.

          Do you know if they use it outside of Open Connect?

          their TCP/IP stack is one of the best

          Measured by what?

          1. 1

            DragonflyBSD laptop support seems rather limited. MacOS has BSD code in userspace but I wouldn’t really call it “a BSD”. Even Windows had BSD code in userspace.

            Your questions about Netflix and the TCP/IP stack are related: they chose it for performance. Netflix probably has servers that aren’t FreeBSD, but they definitely use it for their content delivery.

            When it comes to raw performance, especially in terms of system load per packet, nothing beats FreeBSD. This has been true for as long I can remember.


        2. 2

          You need to upgrade to -CURRENT :)

          OpenBSD is focused on security and simplicity. It has a ton of exploit mitigation features (though there’s HardenedBSD, a FreeBSD fork with a lot of these). OpenBSD lacks a lot of features a FreeBSD power user would be used to. No jails, no DTrace, no ZFS… going from a modern CoW FS with snapshots and stuff to old UFS/FFS makes me very sad.

        1. 2


          1. 11

            It was inevitable.

            If only it made him complete a quest with a random character in adventure mode before continuing to update his system. :D

            This is one good reason why I always use full, explicit paths in my scripts.

            1. 12

              This is one good reason why I always use full, explicit paths in my scripts.

              but then they are not portable

              1. 8
                qbit@slip[0]:~λ which bash
                1. -2

                  Just always use /bin/bash and don’t care about distros/BSDs that don’t care enough about their users to place bash there. Problem solved for 99% of users. ;)

                  1. 10

                    or you know, ignore developers that don’t care about their downstream packagers and users to learn about /usr/bin/env? Problem solved for 99% of users caring about cross platform software.

                    1. 3

                      Not all distros may have env in /usr/bin, so not necessarily an improvement over the extremely common /bin/bash. Then there’s the problem of what /usr/bin/env df might return…

                      1. 12

                        On NixOS, env is the only thing in /usr/bin, so that’s at least one distro that developers can avoid breaking by using it.

                        1. 7

                          IME, globally /usr/bin/env is more likely to exist than /bin/bash. The person who has this dwarf fortress issue seems to have done foolish things to get df to be dwarf fortress so I don’t think this situation is a valid motivator for something that is closer to being a standard (/usr/bin/env) than something that’s not (/bin/bash).

                          1. 1

                            As long as neither /bin/bash nor /usr/bin/env are standards, there can be issues. In addition to this, there is no agreed upon registry for reservation of the names of the executables.

                  2. 1

                    Keep in mind, for this to happen, the user probably changed the system default PATH to put Dwarf Fortress first. sudo usually scrubs the environment to default settings unless you’ve taken steps.

                    1. 10

                      Read the comments on the answer. He dropped a symlink into /usr/local/bin to make the command available to him. /usr/local/bin/df ?

                      1. 1

                        I don’t get this. Did he override the linux df in /usr/local/bin?

                        1. 1

                          The original df is in /bin. He placed another df to /usr/local/bin. The default PATH on Ubuntu has /usr/local/bin before /bin, so his df gots executed instead of the system one.

                        2. 1

                          Why would they use df? Did they not know of the other df? Or did they just not care? I don’t care if someone else set the PATH variable and it isn’t your fault, at best it is confusing, at worst someone messes up an install/copy/backup script, with potential to hose their system.

                          1. 3

                            Not all the world is Unix. I can’t confirm with cursory searches, but given the character set choice (CP437) I strongly suspect that Windows was the original platform.

                            1. 1

                              It was

                    1. 5

                      I did my BSc and BSc Hons. full time, but took my comp sc. up to BSc Hons level via a correspondence university and then my MSc part time while working.

                      So depending on your financial situation I would say from my experience….

                      • If you have no dependents and don’t mind taking a massive financial hit. Do it full time.
                      • If your work place is supportive, doing it part time is next best, but I found the commute to classes on top of the commute to work really really killing. (Ok, it was a loong commute on a very busy, rather deadly road.)
                      • A good correspondence university is actually a pretty good option if you have self discipline. Personally I cope better with a well written, highly detailed textbook compared to a hand waving lecture.

                      ps: Actually ask your lecturers / tutors questions. Most of them feel gratified if someone is paying enough attention / care enough to ask, even fairly dumb questions.

                      pps: You may find full time a little trying… as some lecturers persist in treating students like school kids…. who then respond by behaving like school kids.

                      1. 3

                        ps: Actually ask your lecturers / tutors questions. Most of them feel gratified if someone is paying enough attention / care enough to ask, even fairly dumb questions.

                        Such good advice. Traditional students (those right out of high school) don’t always realize that professors are people.

                        Ask for help early. Professors will work with students who say they are having trouble early. They have little to no patience for students who wait until the end of the term to ask for help (especially when it’s mathemtically impossible to pass).

                      1. 2

                        I have been in this position. I made the decision not to bother with a degree. But, I have a degree now.

                        TL;DR - If you can get the degree for no/low cost. Go for it. Beware burnout. Be aware classes may not be fun, even if you enjoy learning, because you don’t choose what they want you to learn.

                        I started a CS degree in 1990, failed out, went back after two years off. Got through just enough to qualify for co-op (if you don’t know co-op, think paid internship). Never went back. Was able to be employed. Decided I didn’t need the degree. I was mostly self-taught. What I used was mostly not from the classes I had taken.

                        Over time from I drifted from programmer to systems administrator. My first sysadmin-only job was back at the college I’d left, RIT.

                        Not having a college degree there was pressure for me to finish one. Working at the school, tuition was free. I spent some time getting stuff in order. (I inherited a mess, which was a bunch of work, but meant as a sysadmin, my work wasn’t invisible since it made a noticeable difference to the faculty and staff). It took 10 years of working there for me to finish my BS. That was with all my credits from my previous stints. Working full time and taking more than one class was a bit much for me. It would work fine for the first term, okay for the second quarter. By the third term of two classes I was burning out and my work was suffering, so I bailed and didn’t take classes for a while. This repeated more than once. At one point in there, I switched from CS (which I was trying to complete because that’s how I started but was no longer my job) over to Applied Networking and Systems Administration. I eventually finished, but was pretty burned out after keeping the pace of two courses per term steadily for 2 years.

                        Cautions from me to you:

                        1. Watch out for burnout. If you are not going full-time and are paying per-class, feel free to take your time. Burnout is a real danger. I realize some folks don’t have those problems. Maybe you are one of those. But, just be aware. Slower steadier progress can be better than my burst and stall cycle of burnout.
                        2. You are anxious to learn. BEWARE - If you are already very knowledgeable in the field you are going to study, be prepared to do a lot of stupid work. Yes, you will fill in gaps in your self-taught knowledge. Very valuable. There will also be plenty of times they will have you do things that will madden you. I enjoyed the last couple years of my degree work the most because I was finishing my liberal arts concentration and electives. I got to choose things I liked, and didn’t have to do silly busywork that barely makes sense when learning.
                        3. I didn’t have to pay tuition, I just had to buy books. If I had to pay full tuition rates, I’d probably have ignored the degree. More prestigious institutes cost more money. That really only counts fresh out of college. Don’t saddle yourself with lots of debt. I can definitely recommend getting a job at an academic institution who gives you free tuition though :)

                        Good parts of being a “crustacean”:

                        1. I was a much better student as an older student. Part of it was I got the value of it. Part was because I now understood professors are people.
                        2. Part of being a better student came from our accelerated sense of time. I would hit the panic point a week before an assignment was due, rather than hours before when I was 18-19.
                        3. Professors are often more understanding with older students.

                        If you have the financial means to attend full-time, I’d do that. But, for me, financial means means no more than 20 hours per week working outside to support you. Being an adult student, this is probably not you.