10 ms·
What are the differences between OpenBSD and Linux?
- jim-jim-jim 7y agoOpenBSD is a sum of its parts. The individual differences between it and Linux seem minute, but together they provide such a remarkably saner experience. I can't imagine using anything else these days.
- fredsir 7y agoSo for someone who used * linux as main OS for 6 years (and now macOS for 10 years), as well as * linux for servers for just as long, what’s the best way to get started with OpenBSD for servers? Been eying it for a while, but never gotten started.
- 2wrist 7y agoThis gentleman -> https://twitter.com/romanzolotarev https://twitter.com/romanzolotarev is very passionate about OpenBSD and has some handy guides on his site. A good read and interesting to follow.
- fredsir 7y agoLooks like great guides! I'll definitely check them out!
- snazz 7y agoAny cloud VPS service that provides ISO upload will allow you to use OpenBSD. Vultr has OpenBSD 6.4 and 6.5 images pre-configured that you can get installed on a VPS (I’m using a $3.50/mo one). For an even better experience, try it on an old ThinkPad following this guide [0]. You might like how suspend/resume just works, how your brightness and volume hotkeys just work, how the documentation is awesome, and how all the software you need is just one pkg_add away. I’d say that, compared to Linux on the desktop, OpenBSD can be a much more cohesive experience without a desktop environment installed and without endless configuration for basic features. [0]: https://www.c0ffee.net/blog/openbsd-on-a-laptop/ https://www.c0ffee.net/blog/openbsd-on-a-laptop/
- fredsir 7y agoThanks, I'll check it out!
- pnutjam 7y agoIf you stick to a tried and true linux release, like OpenSuse, you can have this in Linux. I get excellent hardware support, zypper package management, and an excellent KDE environment.
- snazz 7y agoYou can certainly get the it-just-works with a big fat desktop environment like KDE, but if you don’t want that (I personally don’t like it that way), OpenBSD with a plain window manager Just Works better than the equivalent with Linux.
- pnutjam 7y agoXfce always works fine for me as well. OpenSUSE has yast for some configuration, it works identically via gui or ncurses.
- oblio 7y agoAnd related to this, how's the multi threading story? Once upon a time the folklore was that Linux was doing well, FreeBSD was also good, but the other BSDs were lagging. Nota bene: my info is from 2010 or even earlier.
- snazz 7y agoI’m no expert on the internals, but with an appropriately configured set of resource limits for your user class, OpenBSD is not much slower than Linux for multithreaded tasks like web browsing. I think they disabled hyperthreading by default for security but I don’t have a device with those capabilities anyway. Firefox spawns many threads on all four cores of my desktop machine and performance is plenty good.
- msla 7y agoI'd be interested in a similar writeup comparing NetBSD to FreeBSD.
- jl6 7y agoAre there some good examples comparing man pages on OpenBSD and man pages on Linux where the former is clearly better? Are we talking about man pages for end-user applications rather than, say, for system calls? And can these differences be resolved with some copy & paste so they are both up to standard?
- anjbe 7y agoI’d say it’s not just that OpenBSD’s manpages are written well (though they are), but that the userland tools are simpler and have a better interface. For example, people often bring up tar as a tool with a less‐than‐intuitive interface. Compare the manual to GNU tar with OpenBSD’s tar: https://manpages.debian.org/stretch/tar/tar.1.en.html https://manpages.debian.org/stretch/tar/tar.1.en.html https://man.openbsd.org/tar.1 https://man.openbsd.org/tar.1 Not only does GNU tar have a bewildering array of options that make reading through the manual a chore, it lists (as far as I can tell) only one example, and in a section devoted to explaining the many ways to specify command‐line options to tar. OpenBSD tar has a whole section dedicated to examples (as is typical for OpenBSD); the manual as a whole is clear, concise, and complete. Another example: GnuPG versus OpenBSD’s signify. https://manpages.debian.org/stretch/gnupg2/gpg2.1.en.html https://manpages.debian.org/stretch/gnupg2/gpg2.1.en.html There’ve got to be over 100 options in there. And although it helpfully places --sign first (and --clear-sign, and --detach-sign, and --encrypt, and --symmetric, and --store, before it finally gets to --decrypt), let’s be real: anyone who’s not already comfortable with encryption software will be completely intimidated by this manual, which is 175 (!) page‐downs in a 80×24 terminal. Contrast with signify: https://man.openbsd.org/signify.1 https://man.openbsd.org/signify.1 The description section starts with the four major operations (sign file, verify file, verify many files, generate key), and is again followed by an examples section. Of course, the OpenBSD tools are much less featureful than the mainstream counterparts. But the reality is that most people, and certainly I myself, need only a few features in day‐to‐day life. Even being a real terminal junkie, I’ve only needed GNU tar specifically once or twice in the last ten years; and when I did, on OpenBSD, it was a mere “pkg_add gtar” away. OpenBSD has a great self‐contained base system, with elegant tools and useful documentation, and an extensive package collection for when that’s not adequate. I continue to use it because it serves my needs as a primary driver, and the interface is just so gosh darn pleasant to use.
- melenaos 7y agoThis is great but I feel that it will be a time sink that I have to work for the system and not the other way around
- joseluisq 7y agoOther related comparison very interesting was https://news.ycombinator.com/item?id=12034277 https://news.ycombinator.com/item?id=12034277
- ferduk 7y agoLooks like the article assumes the use case of a developer's laptop/desktop machine. I've used Win/Linux before and have settled eventually with the Mac - for me it's a sane Linux for the desktop. I'd rather see a comparison for different kinds of server workloads and purposes.
- fluffything 7y agoI'd actually like to use OpenBSD, but then I have to use Airplay with Apple TVs every day, itunes for the tablet/phone, photoshop, illustrator, nvidia graphics cards and CUDA, Docker, etc. So I'm completely locked into a single vendor.
- smonsays 7y ago> But think about what attracted you to Linux in the first place. [...] It was probably a sense of freedom, the promise of a more robust, more secure, more private system. OpenBSD is just the next step on that ladder Although I agree that OpenBSD can offer a cleaner experience if you are willing to compromise on the software you use, when it comes to freedom, I would not consider OpenBSD the next step on the ladder. Of course this is a very personal and philosophical question, but a very significant difference to Linux is the permissive BSD licensing used by OpenBSD. In my opinion the GNU licensing is a big reason why GNU/Linux got so successful since it pushed big companies like IBM to feed their contributions back into the GNU/Linux ecosystem.
- upofadown 7y agoThe downside to the GPL in the case of Linux is that it really works well ... which is an odd thing to say. It has become a giant software cooperative with, as you say, lots of software contributions from lots of companies. As a result the Linux ecosystem suffers from the downsides of commercially driven software development. You can end up with poorly written code generated by unqualified people that addresses short term business needs. Such code tends to be abandoned quickly by its sponsor which causes long term maintenance problems. In the Linux ecosystem, stuff tends to go bad quietly in the darkness. There is no good motivator to produce documentation for anything in the Linux world. Giant, useful, and well written systems get dropped in and end up being more or less useless because only the originator can actually figure out how to use them. The BSDs run off of good old fashioned ego driven software development done by people who care deeply about software. They don't care that much about how others exploit it, only that it is good. It turns out that there are upsides to getting a group of such people together to to work on OS stuff.
- oblio 7y ago> The BSDs run off of good old fashioned ego driven software development done by people who care deeply about software. On the other hand, ego driven software development can also freeze technologies or development processes to what the main ego(s) want(s). Case in point, FreeBSD, NetBSD, OpenBSD and CVS. And even they will admit CVS is sub-optimal for development, see: https://wiki.freebsd.org/VCSWhy https://wiki.freebsd.org/VCSWhy, https://wiki.freebsd.org/VCSCvsProblems https://wiki.freebsd.org/VCSCvsProblems. Note: I'm not saying Git is the solution, but CVS is bad. They should at least use SVN or any of the many systems that have learned from CVS' mistakes. TL;DR: Pick your poison regarding development practices.
- ekianjo 7y agoIsn't the main difference that OpenBSD is an actual UNIX OS while Linux is UNIX-like?
- anjbe 7y agoThe main page https://www.openbsd.org/ https://www.openbsd.org/ describes OpenBSD as UNIX-like. If OpenBSD is UNIX, it’s in the ship of Theseus sense: the outcome of the BSDi lawsuit demonstrated that almost the whole operating system had in fact been rewritten by that time.
- StreamBright 7y agoThat itself is not a significant difference. I think *BSDs are great because they have a saner design (man hier for example) and in many regards superior software, like pf. The do not have the millions of dollars spent on development though, meaning less features and less available guides, help online etc.
- moviuro 7y agoLess available guides is not bad in itself. It also means less bullshit and bad advice. Because of Linux's prevalence for instance, I can't easily find a technologic-neutral guide to build my own mail server on FreeBSD. Also, you don't need guides, etc. man(1) is enough most of the time, and the people on Freenode always lend a helping hand, if you did a bit of homework first.
- skissane 7y agoHow do you define "actual UNIX OS" vs. "UNIX-like"? Officially, "UNIX" is presently defined as a system which has been certified by The Open Group (to whom Novell gifted the Unix trademark, which Novell had bought from AT&T.) To get certification, you need to pay $$$ and pass the test suite. According to that definition, IBM z/OS (formerly known as MVS) is a UNIX; also are AIX, Solaris, HP/UX, SCO UnixWare, SCO OpenServer, macOS. Most Linux isn't, but certain Linux distributions have been certified, in particular Huawei EulerOS (and previously also Inspur K-UX.) To my knowledge, none of the *BSDs have been certified, so officially speaking they are not "UNIX", only "UNIX-like". https://www.opengroup.org/openbrand/register/ https://www.opengroup.org/openbrand/register/
- beagle3 7y agoArticle says ntp-> openntpd At least on Linux, openntpd is unreliable - it might be secure but it fails to keep time properly unless it follows exactly one source or all sources agree perfectly (so I would assume it would equally fail on OpenBSD as well) ntpd is indeed horrible; but chrony is the bees knees from both functionality and security standpoints - openbsd would do well to move to it.
- upofadown 7y agoFrom here: * https://chrony.tuxfamily.org/comparison.html https://chrony.tuxfamily.org/comparison.html "Size of stripped daemon binary in default configuration on Linux x86-64" chrony: 210 KB openntpd: 87 KB I admit to feeling a little amusement at the complete horror expressed by timekeeping geeks when they discover how openntpd handles leap seconds. It doesn't and the developers don't care. The time just slews to the new time at no particular rate. Openntpd ends up being a political protest against the insanity of leap seconds...
- craigsmansion 7y ago> BSD licensing vs GNU licensing I would have been running OpenBSD for a long time on my Thinkpads if they would not be so actively hostile towards the GPL, the FSF, and GNU. Their pufferfish is indeed a well-chosen mascot.
- fluffything 7y agoWhat do you mean by "hostile" ? It's a BSD licensed kernel / project, so making parts of it GPL-licensed would be incompatible with that. You can install GPL'ed code on the system without issues though.
- anjbe 7y agoTheo, commenting on OpenBSD’s attempted move from GCC to the BSD‐licensed PCC: > What other hurdles remain in replacing GPL-licensed programs in OpenBSD? > TdR: But that's never really been the agenda, see. Some people think we hate GNU code. But the thing is we hate large code, and buggy code that upstream does not maintain. That's the real problem... gcc gets about 5-6% slower every release, has new bugs, generates crappy code, and drives us nuts. This is just an attempt to see if something better can show up. (End result: the PCC effort stalled, but OpenBSD has now switched to LLVM on most platforms.)
- busterarm 7y agoTheo's GCC criticisms aren't wrong though. Other large projects have publicly criticized GCC in the past too...FFmpeg rings a bell here.
- fluffything 7y agoI don't see that as hostile. I've never seen anything against including GPL programs/utilities in OpenBSD. When it comes to the BSD-licensed kernel, the only issues i've seen is when, e.g., Linux or other OSes reuse parts of it, improve that, and then want to upstream their changes, but try to do so using a GPL license (e.g. because the changes were applied to the linux copy of the source). That's unacceptable as an OpenBSD contribution. So in some sense the GPL is as bad to OpenBSD, as "private companies reusing open-source code and not contributing back their changes" is to open-source. That sucks (and is quite ironic TBH), but the attitude towards it from OpenBSD is just "sorry, but that license is unacceptable", not "hostility".
- xyproto 7y agoHe lost me at: > The first thing to realize is that, on the surface, the changes are minimal. Both are UNIX-like. You get a terminal, X windows, Firefox, Libreoffice... I use Sway as my WM, which uses Wayland and not X. I use Docker all the time at work. Neither is available in OpenBSD. While I really like OpenBSD, have tried it out and have ported a small open source project to it, I don't think the differences are minimal.
- DyslexicAtheist 7y agodocker sounds like a show stopper if you need it for work. I think if you port a multi-threaded application from Linux it's far from trivial (guess depends on the code last time I needed my C code to work it was just a matter of writing a good configure script - not a skill many have under their belt in 2019). on the WM: I have been using i3 for over a year and never looked back. Also been thinking about giving Sway a spin. Is there any reason I should other than Wayland? Usually I don't notice any problems with X (the reason why I would switch to sway) unless I quickly resize an i3 "container". But maybe I get a better memory footprint from Sway compared to i3? Is Sway worth the trouble to rewrite my i3 config? I understand Sway config is compatible and even has i3-gaps like behavior but I got huge amount of non compatible things inside my setup that requires a rewrite (hence my silly question) and it's not like I need gaps (even it looks awesome, my laptop screen real estate is limited enough as is)
- messe 7y agoDocker can be run via a linux vm nowadays on OpenBSD. Obviously this isn't ideal, but it's roughly how docker functions on macOS and Windows.
- zbentley 7y agoThe user experience of docker-via-VM on the BSDs (well, FreeBSD at least) is really sub-par compared to Macs or Windows, and all three are pretty rough in some areas compared to native linux.
- Crinus 7y agoSince Sway is basically i3 remade on Wayland you can use i3 on OpenBSD.
- huihe9849hjjgkg 7y agoI'm less likely to try OpenBSD after reading that.
- kstenerud 7y agoThis is, unfortunately, not a very good argument in favor of OpenBSD. It all boils down to this one bit near the bottom of the post: "There are very few things OpenBSD does that Linux does not. However, what they do, they do better." But with no explanation of where it is "better", or even what "better" is, this isn't a valid argument. He even points this out himself a short while later: "Are you telling me that the positives are intangible and the negatives mean a slower system and less software overall?"
- nuccy 7y agoSpeaking of "better", the author mentioned that his laptop works less from battery in OpenBSD than on Linux (3.5 hours vs 5 hours) and applications run slower. Unless there is a problem with OpenBSD drivers or CPU governing profiles, for me it means "worse" actually. I was always curious why we don't have a simplified kernel for desktop/laptop use. I imagine 90% of people are running their computers in almost single user mode. E.g. at the moment my Debian, except my main username, also runs programs as root, systemd*, Debian-gdm, messagebus, some of which might be merged either with root, or with my main account. All the security features of the kernel (OpenBSD or Linux) are actually not used that much, so we could in principle make software faster and battery life longer just by "optimizing" that features. Same is true for clusters, VM hosts, embedded Linux. It seems we overkill with security, providing fake sense of protection, while giving up on important metrics: execution time, battery life, memory usage, bandwidth, etc. At the moment the biggest security concern of mine is not the services running on my laptop in background, even with open tcp/udp ports, but the fact that my browser is running under the same username, which I use to access ssh keys, ssh-agent sockets in /tmp, password manager's files, photos, etc. Browser executes arbitrary code from the unknown to me sources all the time and one day someone will break the sandbox-ing and copy my files out.
- fpoling 7y agoI use containers on my development machine to limit the damage that can be done when I fall victim to malware stuffed into development package. Surely it will not stop a targeted attack. But a generic malware does not bother yet to try to escape from containers. So it does give some protection. Surely using VM will give even better protection while allowing for simpler kernel, but as the compilation requires up to 16GB or RAM and may take up to 2 hours, using VM will add an overhead that I cannot afford.
- azdacha 7y agoIt would be nice to add that OpenBSD has no support of Docker, but geez, if it had I'd be probably using it 98% of my time
- deleted 7y ago[deleted]
- INTPenis 7y agoAnother article by a BSD evangelist. I used to be one myself. This article does not cover the actual issues you will encounter when going from Linux to OpenBSD. The first actual issue is that the installer is in text and not very forgiving of mistakes. It's also a very simple installer that some would praise as a no-nonsense program but coming from Linux where graphical programs with support for disk encryption and multiple storage controllers are common this will be noticed. The next difference you'll notice is packages. You're likely used to binary packages from Debian, CentOS and other distros. OpenBSD has them too but they're far fewer than any Linux distro. Simply because the number of people (package maintainers) working on the BSD ecosystem are fewer. So get ready to compile a lot. Which is just a bad idea when it comes to lifecycle management. The next difference you might encounter further down the line is how many user space programs act differently from Linux. Like for example route, netstat, tar and many more. You might not find some favorites like lsof and ss, instead having to learn others like fstat. In my personal opinion the general state of these user space CLI programs is much worse in OpenBSD. And finally, lifecycle management is generally much worse in OpenBSD than in the major distros.
- aquabeagle 7y agoThe next difference you might encounter further down the line is how many user space programs act differently from Linux. Like for example route, netstat, tar and many more. Why not fault Linux for not having the same interfaces as the BSD tools? The BSD ones were there first. The reality is that the systems are different and OpenBSD is not trying to be Linux. Faulting either one just for not being the same as the other is silly.
- jiveturkey 7y ago> Why not fault Linux for not having the same interfaces as the BSD tools? The BSD ones were there first. >> when going from Linux to OpenBSD or you could rephrase it, when going from more popular to less popular. He isn't finding fault, he's expressing a practical issue that is relevant to the more common viewpoint (including the author of the article, whose audience is curious linux users). Contrary to the title of the article, which is agnostic and what you are arguing for, the article is actually written from a specific POV, for a specific audience: > This list is aimed at people who are used to Linux and are curious about OpenBSD.
- typenil 7y ago"Some Linux-kernel-specific software does not work either. Namely, docker." And that's where it loses me. All my development work requires docker. Gotta stick with Arch.
- technofiend 7y agoKudos to Linux distributions that make user-friendly installers, windows-like/mac-like UIs and otherwise paper over Linux to make it mainstream-ready. Anything to get people onto arguably safer operating systems than Windows is to be lauded. In contrast beyond the obvious technical differences OpenBSD is largely a self-service operating system in that the community expects people to self-educate before posting to misc and asking for help. I jokingly call it a full contact OS for this reason. A reasonably technical person can read the docs and figure out how to install and use OpenBSD. But there is no training wheels distribution to ease you in.
- WindowsFon4life 7y agoEasy. One is a kernel, and one is a distro.