FreeBSD: Load Kernel Module at Runtime

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.

Want to read Linux tips and tricks, but don't have time to check our blog everyday? Subscribe to our daily email newsletter to make sure you don't miss a single tip/tricks. Subscribe to our weekly newsletter here!

{ 0 comments… add one now }

Leave a Comment

You can use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

Tagged as: , , , , , , , , , , ,

Previous post: Linux: Scan An Image With HP Scanners

Next post: Find Out If Patch Number ( CVE ) Has Been Applied To RHEL / CentOS Linux