Tutorial 01 · FreeBSD

Installing FreeBSD 15 step by step

Boot the installer, let bsdinstall lay out ZFS for you, and finish with a clean, bootable system.

Last updated

This walks through a fresh install of FreeBSD 15.1-RELEASE on amd64 using the standard bsdinstall installer and the automatic ZFS layout. The same steps apply to a physical machine or a virtual machine.

1Download and write the installer

Get an image from the official download site. disc1 contains everything needed for an offline install; bootonly fetches components over the network. The memstick image is for USB sticks. Always check the published checksum.

fetch https://download.freebsd.org/releases/amd64/amd64/ISO-IMAGES/15.1/FreeBSD-15.1-RELEASE-amd64-memstick.img
fetch https://download.freebsd.org/releases/amd64/amd64/ISO-IMAGES/15.1/CHECKSUM.SHA256-FreeBSD-15.1-RELEASE-amd64
sha256 FreeBSD-15.1-RELEASE-amd64-memstick.img
# For an optical/VM install, fetch FreeBSD-15.1-RELEASE-amd64-disc1.iso from the same directory instead.

Write the image to a USB stick. This destroys everything on the target device, so double-check the device name first.

# On FreeBSD (check the device with: geom disk list)
dd if=FreeBSD-15.1-RELEASE-amd64-memstick.img of=/dev/da0 bs=1m conv=sync status=progress

# On macOS (check with: diskutil list)
diskutil unmountDisk /dev/disk4
sudo dd if=FreeBSD-15.1-RELEASE-amd64-memstick.img of=/dev/rdisk4 bs=1m

2Boot and start bsdinstall

Boot from the stick (UEFI is recommended on modern hardware). At the welcome screen choose Install, pick a keymap, then set a hostname such as host.example.org.

Next, choose how to install the base system and which optional components you want. FreeBSD 15.1 can install the base system either from the traditional distribution sets or as packages (pkgbase). The choice affects how you patch later, so read the tutorial on keeping patched first if you're unsure. For most people, the default selections are fine; adding src is optional and only needed if you plan to build from source.

3Partition with Auto (ZFS)

Choose Auto (ZFS). The defaults create a pool named zroot with sensible datasets and boot environment support, which the bectl tutorial relies on.

Things worth reviewing on this screen:

Pool type: stripe for one disk, mirror for two or more identical disks, or raidz1/2/3 for larger arrays.
Partition scheme: GPT (UEFI) or GPT (BIOS+UEFI) for older machines.
Swap size: the default is fine for most systems.
Encrypt disks: optional full-disk encryption with GELI, which asks for a passphrase at every boot.

Select the disk or disks, confirm, and the installer will write the layout and extract the system.

4Finish the configuration

The installer then walks you through the remaining settings:

Root password: choose a strong one.
Network: pick the interface (for example em0 or vtnet0) and choose DHCP/SLAAC or enter static details. Static examples look like 192.0.2.10/24, gateway 192.0.2.1.
Time zone and clock.
Services: enable sshd, ntpd (or ntpd_sync_on_start) and powerd as needed.
Security hardening: options such as hiding other users' processes, clearing /tmp at boot and disabling the sendmail service are sensible to enable.
Add users: create your everyday account now and add it to the wheel group so it can become root.

Choose Exit, decline the shell unless you need manual changes, remove the installation media and reboot.

← All FreeBSD tutorials