How do I install FreeBSD kernel source code?

Posted on in Categories last updated June 30, 2007

Q. I need to configure FreeBSD kernel but not able to find out source code in /usr/src/sys directory. How do I install FreeBSD source code?

A.Your kernel and all related source code is located at /usr/src/sys directory which is also accessible through the /sys path.

If there is not a /usr/src/sys directory on your system, then the kernel source has not been installed. The easiest way to do this is by running sysinstall as root, choosing Configure, then Distributions, then src, then base and sys
# sysinstall
sysinstall-1.jpg

Select Configure
sysinstall-2.jpg
Select Distributions
sysinstall-3.jpg
Select src
sysinstall-4.jpg
Then base and sys > Select ok
sysinstall-5.jpg

Further readings

Posted by: Vivek Gite

The author is the creator of nixCraft and a seasoned sysadmin and a trainer for the Linux operating system/Unix shell scripting. He has worked with global clients and in various industries, including IT, education, defense and space research, and the nonprofit sector. Follow him on Twitter, Facebook, Google+.

8 comment

Leave a Comment