I've used Ubuntu on and off since Warty Warthog. I was thinking about installing Jaunty soon; but I noticed that over the weekend NetBSD 5.0, Dragonfly BSD 2.2.1, OpenBSD 4.5, and FreeBSD 7.2 have all been released, so I got curious:
What is good about the BSDs? Why should or shouldn't I install one of them instead of Ubuntu? What are their main selling points? Performance? Stability? Hardware compatibility? Ease-of-use? Security? Do they run well on older hardware? What is it?
Edit: This is from the point of view of a (primarily Java) desktop developer, but I'd be interested to know what are the pros and cons for others also. Are they targeted more for servers? For corporate users? Or what?
Advantages of BSDs
The *BSD family of systems has (IMHO) a few key advantages over Linux, particularly for a server O/S.
Simplicity and Control: None of the *BSD distributions have the imperative to add features that the Linux distributors exhibit. Thus, the default install of most BSD derived systems is relatively simple.
Stability: Partially driven by the simplicity, BSDs tend to be amongst the most stable O/S platforms around. FreeBSD (which is one of the older of the 'modern' BSDs) powers many well known .coms such as Yahoo and (at one point) hotmail. In fact, at one point Microsoft suffered quite a lot of embarassment over their inability to migrate Hotmail off FreeBSD to Windows.
Security: OpenBSD in particular has a very strong track record of security and much of their work rubs off on the *BSD community in general.
Portability: NetBSD in particular has ports to dozens of platforms and is notable for being very easy to port.
Some weaknesses
Less support for large SMP configurations than Linux. This will become more of an issue as boxes with large numbers of cores becore widespread. However, most of the network service applications that are really BSD's home turf are not all that CPU hungry (1).
SMP performance on BSD kernels has improved substantially over the past decade. Improving SMP performance was one of the main goals of Dragonfly BSD and the FreeBSD SMPNg project has substantially improved SMP performance on that platform, outperforming Linux on 8-core platforms. This means that one can expect to get good performance on mainstream 2 and 4 socket servers.
Some debate and early work on providing NUMA support on FreeBSD exists as the system does not currently support APIs for memory allocation, affinity management or other facilities for explicit NUMA support. A good primer on NUMA support can be found here.
Smaller range of hardware support than Linux: In practice, this really only means that you need to check components on a hardware compatibility list. For a server this is a non-issue in most cases but installing on a random desktop PC this is a bit thornier. You still have to do a component-by-component check if you want a machine to install BSD on, which is less likely to be the case with Linux.
Less emphasis on the desktop: Desktop distributions of Linux (such as Ubuntu) tend to have richer desktop support for multimedia, emulation and bundled applications. While many such applications do have ports onto the various BSD platforms the out-of-the-box support from a desktop Linux distribution will typically be rather better.
Some gaps in software: Quite a lot of commercial Linux software does not have a BSD port. For example, none of the major JVM suppliers maintain a native port of their java runtime for any of the BSD platforms. In some cases third parties maintain ports but there is no official support for (for example) Oracle on any of the BSDs. This type of gap pops up in some places on BSD; BSD may not be the platform for you if you work in a space where this type of gap exists.
Some salient points
One of the great religious wars of the '90s was GPL vs. BSD. BSDs are licensed under the BSD licence, which comes with a different set of rights than the GPL. Essentially the BSD licence does not require you to redistribute source code of modified versions of BSD licensed software.
Commercial vendors such as Oracle do not support BSD to anything like the degree that they support Linux. Therefore, if you want to work with such a product you are probably better off with Linux. However, most offer binary compatibility across Linux, System V, Solaris etc, so you can often run binaries for another O/S.
BSD communities tend to be run differently to Linux and are often smaller (although no more genteel in many cases - Theo De Raadt has something of a reputation as a potty-mouth).
Some of the BSD variants are niche-market items, optimised for specific goals. For example, OpenBSD is specifically optimised for providing secure network infrastructure on internet-facing computers, with a very large amount of effort going into inspection for security holes like buffer overrun vulnerabilities. Many security conscious organisations use it for precisely this reason. NetBSD is designed for portability with ports to dozens of platforms and is quite widely used in embedded systems. For applications in the sweet spot of one of these systems it may well be the best choice of platform.
The home turf of *BSD is in network services - email and web servers, infrastructure and suchlike. You can set up a perfectly good geek desktop with any of the BSDs, and could in theory produce something as warm and fluffy as Ubuntu. However, this is not the core focus of most of the BSD products, although some such as PC-BSD do aim to provide desktop systems.
If you want to make a trad unix geek desktop BSD will do this just as well as any other unix-oid system.
I don't consider BSD to be quite as mature as Linux on the Desktop but for servers it's rock solid.
Whether you want to install BSD or not depends entirely on what you use your machine for. While many things are similar to Linux many things are different too.
However here is a run down of the different BSDs
OpenBSD : One if it's mail goals is to be the most secure OS (and it probably is)
NetBSD : It's motto is "Of course it'll run NetBSD". This has to be one of the most portable operating systems around. Many people run it on desktops too.
FreeBSD : Very popular for servers although again many people run it on the desktop too. Probably the most popular of all the BSDs
DragonFly BSD : A relative new comer (2003), it was a fork of FreeBSD 4.8. I've not used it myself but apparently is stable.
In the Linux world, distributions tend to be lacking in that... cohesive feeling. They are often built in a decentralized manner, which tends to lead to this.
The BSDs are usually managed by one person, so you get the feeling that each variant is an actual product that had a lot of planning behind it. Things work together very well, and all components are very well documented. You rarely find kludges.
This lays a very solid foundation, making the BSDs an easy to maintain platform, therefore having the potential to lead to a more secure and manageable environment.
I've been a Linux user for 13 years now, and while I still consider it a viable platform, I have moved all of my production and personal servers to the BSDs for the reasons mentioned above.
However, Linux still might be the better choice for the desktop due to its bleeding edge driver support.
BSD is generally considered secure by default, by disabling all but the core services. It's also very stable, you can tell this by looking at one of the many uptime monitoring services.
Be warned however, that Linux isn't the same as BSD...there is a learning curve, so don't expect to jump straight into it. For example you'll find all the core commands, such as
ls
have different flags which can be confusing at first and can take a while to break an old habit of using Linux flags.I really like
/usr/ports
. This isn't to say that I don't also really likeapt-get
, but it's a pleasing feeling to know that your installs are being built on and for your particular machine, with any optimizations you felt like throwing into the makefile defaults.How much of the perceived benefit of that is superstition, I haven't done the research to find out, but I like it. :)
*BSD is a complete OS, meaning the kernel and the userland is developed from the same source tree, whereas Linux distributions are butchered together from various sources. This is why BSD systems feel much more cohesive and solid. Also better documented.
Just a few issues:
Pro (Free)BSD:
Contra BSD:
As a Java developer, the big gotcha is there is no mainstream JVM for *BSD. Before everyone flames me out of existence, what I mean is, there is no current shipping JDK from Sun or any of the other major vendors (IBM, BEA/Oracle) so you will always be playing second fiddle to linux and window users.
Licensing
The main difference between the BSDs and Linux is the licensing.
You can take a BSD code base, make whatever changes you want to it, and distribute the resulting binary, sell it, etc, without opening the source code changes you made.
This is very attractive for companies, such as Apple, where legal obligations to their stockholders may require them to keep proprietary IP 'safe'. Apple based some of its kernel on FreeBSD, for instance.
Tivo wouldnt' have had the (minor) licensing issues it suffered years ago if they built on top of BSD rather than Linux.
Some practical differences
-Adam
Security, security and one more time security.