The joy of BSD

I've been toying with FreeBSD for a few years, and run it here and there (at work) for firewalling and network duties. I've been thinking for a while about how much I like it, versus Linux which I mostly use at the moment. Now I've taken the plunge and run it fully on my home server for file serving, development and general geekage.

Mostly its excellent, and getting it running is trivially easy (just don't be scared by the installer, its not hard), but there are a few non-obvious parts to the BSD n00b I thought would be worth pointing out for anyone else considering a switch.

This page tries to say what and why.

NB: this is all based on my experience with FreeBSD 6.2 - earlier versions may be different, as may later versions if I've not updated for them yet.

Why BSD?

It's a 'purer' operating system; its like Linux but without all the distribution-specific differences and incompatibilities. Its consistent and well-organised. Its fast, secure and full features.

Its also very easy to maintain an existing installation, updating for security patches but otherwise keeping the system stable, consistent and working.

Some concepts

Core systen vs. everything else

Installing it

Get a decent shell

Managing/updating the ports collection

Forget what it says in the handbook about the three different ways of updating the ports tree. Just use portsnap.

After installing FreeBSD

Straight after installing, you'll have a version of the ports collectin in /usr/ports and you'll have portsnap installed but not set up. Run the commands below to fetch the latest reversion of the ports tree and install it into /usr/ports (overwriting what you had there already):

portsnap fetch
portsnap extract

Periodically

Then, whenever you want to check for updates, run these commands - this will pick up any patches/updates and apply them to /usr/ports:

portsnap fetch
portsnap extract

General procedure

Updating for security

Things To Be Aware Of

Booting into single-user mode doesn't mount /usr

Translated; this means 'don't depend on things from the ports tree or other 3rd party packages when trying to repair your system: make sure you can get a working root command line without them'.

Resources elsewhere

Firstly; start with the FreeBSD site, handbook and mailing lists. They are good. Beyond that, here are some other places also containing useful tidbits: