To load a kernel module on a FreeBSD system at runtime, you can use the kldload
command.
To load a kernel module, you will need to specify the path to the module file, which is typically located in the /boot/kernel
directory.
For example, to load the if_em
kernel module, you can run the following command:
# kldload /boot/kernel/if_em.ko
This will load the if_em
kernel module into the kernel.
To verify that the kernel module has been loaded, you can use the kldstat
command:
# kldstat
This will list all the loaded kernel modules and their status.
To unload a kernel module, you can use the kldunload
command followed by the name of the module:
# kldunload if_em
This will unload the if_em
kernel module from the kernel.
Note that you will need to have the necessary permissions to load and unload kernel modules on the system.
For more information about loading and unloading kernel modules on a FreeBSD system, you can refer to the FreeBSD documentation and the kldload
, kldstat
, and kldunload
man pages by running man kldload
, man kldstat
, and man kldunload
on the command line.