Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

Linux drivers come in a form of kernel modules (*.ko files), which can be given parameters when loaded into the kernel and usually live in /lib/modules/<kernel version>.

What's the similar arrangement for BSD/OSX? For example, I've just installed MacFUSE and have hard time understanding what exactly did the installer put into my system.

share|improve this question
add comment

1 Answer

up vote 2 down vote accepted

I'm not sure about other BSD, but OSX have kernel extensions (known as kext).

Kexts live in /System/Library/Extensions/. Each of them is a folder, containing device description and instruction (those that makes a driver). Things in a kext need suitable file permissions (generally belong to user 0:0 with mask 755) for it to work.

After a kext is in place, the OS will automatically load it on reboot (although sometimes instantly). Occasionally you need to clear the kext cache (rm -r /System/Library/Extensions/Caches/) before the new kext will work correctly.

share|improve this answer
1  
and the nice thing about kexts is that, certain compatibility caveats aside, a kext can work across minor kernel updates and often even major ones. Mac OS X APIs are more "stable" and defined. –  jrg Sep 2 '10 at 20:26
    
And the awesome thing about Linux kernel modules is that they can be compiled so they won't load on kernels where the functions/data descriptions don't match, so they work for a largeish stretch of kernel versions. Sadly, almost nobody uses this, as all modules that might be required are part of the kernel package... plus they can be loaded/unloaded automatically (or by hand). –  vonbrand Mar 15 '13 at 16:25
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.