FreeBSD: Load Kernel Module at Runtime

by Vivek Gite on October 1, 2008 · 0 comments

Q. How do I load a kernel module at runtime from a shell prompt under FreeBSD UNIX operating systems?

A. You need to use the kldload utility loads file.ko into the kernel using the kernel linker. /boot/kernel directory containing loadable modules. Modules must have an extension of .ko. The kldload utility exits 0 on success, and >0 if an error occurs.

Load module called foo

Type the command as follows:
# kldload foo
To list loaded module use kldstat:
# kldstat
Some modules such as pf, ipfw, ipf, etc. may be automatically loaded at boot time when the corresponding rc.conf statement is used.

Featured Articles:

Share this with other sys admins!
Facebook it - Tweet it - Print it -

Leave a Comment

You can use these HTML tags and attributes for your code and commands: <strong> <em> <ol> <li> <u> <ul> <blockquote> <pre> <a href="" title="">
What is 4 + 3 ?
Please leave these two fields as-is:
Solve the simple math so we know that you are a human and not a bot.




Previous post:

Next post: