summaryrefslogtreecommitdiff
path: root/content/bsd/why-bsd.md
blob: 6bde63dcc1dfc1da296a2b7085c0705904d744ee (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
+++
title = "Why I run a BSD on a PC"
author = ["Michał Sapka"]
date = 2024-05-01T21:48:00+02:00
categories = ["bsd"]
draft = false
weight = 2001
primary_menu = "bsd"
abstract = "Reasons why BSD may be the best OS for you"
menu_item_override = "Why I run BSD on a PC"
menu_item_override_start_li = true
[menu]
  [menu.bsd]
    weight = 2001
    identifier = "why-i-run-a-bsd-on-a-pc"
    post = "but"
+++

There's multitude of Operating Systems to choose from.
You may have been using something like Windows or MacOS and be perfectly happy with it.
You can step up and use Linux, Haiku or even Amiga OS.
So, why do I think a BSD system may be a great choice?


## Freedom {#freedom}

The most popular systems out there are proprietary.
This has the small downside of having to pay, but there's another one.
Closed systems have tendency to limit the user.
It's much more visible with MacOS than in Windows, but the user is always blocked from doing what the user wants to do.
Are you following the product manager's ideal path?
Is web browser everything you need to run?
If so - getting something from Silicon Valley may enough.

But a lot of us are hungry for more; we want to be in control instead of being controlled.
FreeBSD and GNU/Linux give the user a huge power to adjust itself to the needs and wins.


## License {#license}

One of the reasons for choosing BSD are the legals term under which all BSDs are provided - the BSD license.
It differs strongly from what GNU and others propose.
While also being "freedom respecting", it does not limit anyone.
Want to create a closed source fork of FreeBSD and stop giving anything back after few short years?
Don't want to have your hands tied by GPL?
Are you Apple?
Because that's how MacOS X started.

BSD licenses are amongst the most liberal one.
The standard "[3-Clause BSD License](https://opensource.org/license/bsd-3-clause)" limits only the liability of the code provider.

Some say that BSD License are a problem as companies may take and never give up (like Sony did for PS4), but it's as close to the idea of "Free software" as it gets.


## No BigTech {#no-bigtech}

As a result of this, there is very little interference from Big Tech.
While Linux is happily in bed with the likes of Microsoft, Google, who are able to steer the development, BSDs are still very much a niche and independent product.
Just look at list of sponsors of [Linux Foundation!](https://www.linuxfoundation.org/about/members)

In BSD-land we've got some big players, with Netflix being the most prominent one.
But the cooperation is very much on partner terms.
Netflix gives back, but it does not dictate the direction.


## A designed OS {#a-designed-os}

But the biggest differential factor between BSDs and GNU/Linux is the way it is structured.

{{< img-r "run-bsd.png" >}}
RunBSD
{{< /img-r >}}

In Linux, all components are designed to work together, but are completely separate.
You've got the kernel, init systems, multimedia daemons, userland, bootloader, virtualization and containerization mechanisms, package managers, and so on.
They are all separate projects with their own goals and are operated by separate entities.
This is why we've got different Linux Distributions instead of Operating System.
Everyone can take the kernel, start adding components on top of it, and a few minutes later the distrowatch is even harder to keep up with.

Each BSD on the other hand is designed as single system.
All components are created and developed together.
Things work together perfectly, because they are designed, coded, tested and released as one.

When you install any BSD you are getting the complete package.


## Build-in technology {#build-in-technology}

To give just two examples here:

1.  OpenBSD comes with complete web stack built in.
    We've got a packet filter (best in class), reverse proxy and http server.
    We've even got a TLS certificate manager.
    The configuration of all those use similar format, whish is fully explained in man pages.
    You don't need any external packages.
    And the security of each of those is as high as rest of the OS.
    All things work together in perfect harmony, as it is designed as such.

2.  FreeBSD comes with ZFS.
    One thing this file system provides are efficient and bullet-proof snapshots.
    The developers of FreeBSD used it to create the idea of boot environments - a snapshot of OS.
    The user can easily boot from any of those in any moment.
    Even the standard update process creates a new boot env, just in case something goes wrong.

Such integration would be very hard to achieve without up-front design.

And the list goes on: Jails, Beehive, Vnet,  Dtrace, Ports system, OpenSSH, or Libre SSL.
The crazy folks over at OpenBSD are even working on their own version control system called [Game of Trees](https://gameoftrees.org/index.html).
You can find a great deep-dive into FreeBSD tech on [Vermaden's site](https://vermaden.wordpress.com/2020/09/07/quare-freebsd/).

This has the added benefit of having the entire system codebase in a single place.
One needs to follow only a few repositories to be up-to-date and informed.
Mind you, those are _gigantic_ repositories, but if you are smart enough[^fn:1] - it's there.


## Documentation {#documentation}

Speaking of documentation, all BSDs have amazing docs.
In GNU world a lot of people were discouraged from man pages, as the quality is not there.
In BSD land the manuals are top-notch and are treated as integral component of each program, and therefore the OS.
Just take a look at the aforementioned [Httpd configuration](https://man.openbsd.org/httpd.conf.5).

The man pages don't end here.
You can compare how termios is described in [FreeBSD](https://man.freebsd.org/cgi/man.cgi?query=termios&apropos=0&sektion=4&manpath=FreeBSD+14.0-RELEASE+and+Ports&arch=default&format=html) and in [Linux](https://man7.org/linux/man-pages/man3/termios.3.html).
Quite often I am finding that the provided offline manual are more than enough.

You can also check the amazing [FreeBSD Guidebook.](https://docs.freebsd.org/en/books/handbook/)

FreeBSD has a dedicated [Documentation Engineering Team](https://www.freebsd.org/internal/doceng/) and their work add immeasurable value.


## Community and culture {#community-and-culture}

And not only them.
Occasionally when I wrote something dumb, instead of being screamed at, some maintainer reached out to me and gathered feedback or explained the thing I was missing.
When the people developing the OS have such attitude, BSD community is also infected by this positivity.
Yes, like everywhere, there are some bad eggs, but its nowhere near the OS wars we're seeing in GNU/Linux or proprietary systems.
This may be a result of the fact, that BSD users tend to be much more experienced - it's not the type of OS which people randomly install.
More often than not, using BSD is just a next phase after being involved in Linux.
Also, it seems hard to be _only_ focused on BSD, so people being paid to do BSD work tend to do the same with GNU/Linux.
All in all, I found the crowd to be very welcoming of new people.

{{< img-r "openbsd.png" >}}
RunBSD
{{< /img-r >}}

You can find amazing people over at [bsd.cafe](https://wiki.bsd.cafe/) or [bsd.network](https://bsd.network/).
The oldest public UNIX system, [SDF](https://sdf.org/) is running on NetBSD and quite a few of it's members are active in BSD community.
There's also [Michael W. Lucas](https://mwl.io) who makes a living writing AMAZING technical BSD-related books.
And we've got a great dedicated podcast, [BSD Now](https://www.bsdnow.tv/).
There's also a community bulletin board - [unitedbsd](https://www.unitedbsd.com/)


## POSIX and widening perspective {#posix-and-widening-perspective}

The one thing that is not welcomed, however, is change for the sake of change.
All BSDs take portability very seriously and follow POSIX closely.
You won't find craziness in the base install, like ZSH or even Bash.
FreeBSD only recently migrated root shell to Bourne Shell sh(1) from tsch(1).
I'm sure a lot of people have never used those despite living in a POSIX-compatible (or even certified) OS.

Only after daily driving BSD, I started to appreciate following POSIX and not using bashisms.


## OSes, not distributions {#oses-not-distributions}

However, one thing which took me some time to understand was: why do we have those different BSDs instead of a single one.
Well, OpenBSD, FreeBSD, NetBSD, and DragonFly BSD are separate operating systems that have forked from each other[^fn:2].
They are developed separately and have separate teams.
And even though the code very often migrates between them, they are not the same.

Just an example: PF, the great packet filter was developed as part of OpenBSD.
It was then ported to FreeBSD.
It worked great, but with time, it diverged from the OpenBSD's one quite significantly, and all those changes had to be ported again, just recently.
Since OpenBSD and FreeBSD grew out of Unix, they are binary compatible, but their kernels differ significantly.
FreeBSD and OpenBSD have different goals, and therefore are diverging more and more.
Packet Firewall needs to be fast, so it needs to interact closely with the kernel.
This means that all attempts to align PF on these systems requires significant effort.

Another example: ZFS.
It's a staple of FreeBSD, it's integrated deeply into everything.
But it was never ported to OpenBSD.
In fact, it may never be forked, since it's not aligned with OpenBSD's ideology.


## Linux's software availability {#linux-s-software-availability}

But what good is an OS without software?
Luckly, you've most of Linux has to offer.
Most popular programs are already ported, and those not may not be that difficult to port yourself.

FreeBSD even comes with Linux compatibility layer called [Linuxulator](https://freebsdfoundation.org/blog/update-on-freebsd-foundation-investment-in-linuxulator/)

Not having Microsoft or Adobe is, at least for me, meaningless.
I run a FOSS software in my personal life.


## Dedicated uses-cases {#dedicated-uses-cases}

But why do we care about all those systems?
Well, since they have different goals and visions they have different appliances where they shine.
You can use any BSD on a PC (with great successes!0, but when you get comfortable with the system you may want to go deeper.

FreeBSD with ZFS is a perfect system for a NAS.
OpenBSD with its security focus is often used for homegrown routes (and the site is hosted on OpenBSD VM).
NetBSD is known to run on anything, and therefore is often used of embedded devices - like a [toaster](https://blog.embeddedts.com/netbsd-toaster-powered-by-the-ts-7200-arm9-sbc/).


## History {#history}

But still share the Unix lineage and can be traced to **that huge computer in Bell Labs**.
This is very personal, but for me, it was one the factors driving me towards BSD.
Linux is Posix-like, so it looks like Unix, but it not one.
BSD are direct descendants of Unix.

This is also one the reasons BSDs follow Unix philosophy so closely.


## RunBSD {#runbsd}

Those are _mine_ reasons, but everyone has different.
You can read more testimonials on [RunBSD](https://runbsd.info/) site, or random blogs like [Jonathan's](https://web.jessups.org/jhjessup/posts/2023-01-30_openbsd-laptop) or [Ruben's](https://rubenerd.com/its-worth-running-a-freebsd-or-netbsd-desktop/).

[^fn:1]: I am not; just barely licking C for now.
[^fn:2]: vide: [BSD History](/bsd/history) on this site.