Install .kext files for Mac Beginners

One of the first thing I have had to learn, once installed Mac Os X 10.5.5 leopard on my pc ;-) is how to install the drivers for my specific hardware.

In Mac World, most drivers come in the form of .kext files and it is relatively easy to find them in internet, but how to install them?

There are several utilities you can use, one of the simplest one is kext helper, but just in case, I have always prefer to know what happens behind the scenes, so here is the long way:

  1. Supposing xxxxx.kext is the file you want to install, with the finder, copy it to /System/Library/Extensions
  2. Open Terminal from Applications/Utilities
  3. In the Terminal windows type the following:
    $ chmod -r 755 /System/Library/Extensions/xxxxx.kext
    $ chown -r root:wheel /System/Library/Extensions/xxxxx.kext
  4. Remove the cache files:
    $ rm /system/Library/Extensions.kext
  5. If you have kextcache (few people have):
    $ rm /System/Library/Extensions.kextcache
    $ rm Extensions.mcache
    $ sudo kextcache -k /System/Library/Extension
  6. And finally, reboot

Instead of removing cache files (step 4 and 5) you can specify the -f -v options at boot time. The -v option is the verbose option, which allow you to see what is happening while loading the os, and the -f option tells the os to reload all .kext files.