Install FreeBSD sources.

In some cases you may need the sources (kernel source) for your FreeBSD installation. However if you did not select the source package in the installer it will not be installed.

The installation is actually quite simple but is not done via a tool as some might expect. In former times you could use sysinstall but that does not exist anymore.

You can either connect via your favourite ftp client (lftp) to the official server (or a mirror of your choice) or you can use the fetch command to retrieve the source package. Be sure to download the correct version (e.g. use freebsd-version -k to find out).

% freebsd-version -k
% fetch
src.txz                                       100% of  140 MB   23 MBps 00m06s
% su -
# tar -xzvf src.txz -C /

This will extract the sources into the proper locations.

Jens Grassel Written by:

Solving problems and burning chrome for fun and profit.