Manage FreeBSD kernel modules on the fly

There are several utilities in FreeBSD to manage kernel modules. Among them are: kldload, kldstat, kldunload.

First (kldload) would be useful for loading files *.ko into FreeBSD kernel using kernel linker. Second (kldstat) displays status of files loaded into kernel. Third (kldunload) helps to unload files which were previously loaded into kernel with kldload.

This utilities are analogues of modprobe and lsmod utilities in Linux.

Example: in order to enable ipfw kernel module without FreeBSD restarting you can do:

cd /boot/kernel
kldload ipfw.ko

Another way to enable ipfw is to add line firewall_enable="YES" into /etc/rc.conf and restart FreeBSD. But kldload method is much more easier and fast as for me 🙂

SHARE:
nv-author-image

Stefan Durand

My name is Stefan, I'm the admin of LinuxScrew. I am a full-time Linux/Unix sysadmin, a hobby Python programmer, and a part-time blogger. I post useful guides, tips, and tutorials on common Linux and Programming issues. Feel free to reach out in the comment section.

1 thought on “Manage FreeBSD kernel modules on the fly”

Leave a Reply

Your email address will not be published. Required fields are marked *