How do I install FreeBSD kernel source code?

by Vivek Gite · 5 comments

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

Featured Articles:

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!

{ 5 comments… read them below or add one }

1 SIFE 09.17.09 at 11:41 pm

Salamo Alikom
does any way to get it with cvs ?

2 Cristian Navalici 10.06.09 at 4:57 pm

Thanks a lot for the information!
It was helpful

3 Dask 01.29.10 at 5:56 pm

tnks man!
It really help me!

4 Ben 02.11.10 at 12:26 pm

followed these steps, but got:

Warning: Can’t find the ‘8.0-RELEASE-p2′ distribution on this FTP server.

I chose many different servers. What now?

5 Ben 02.11.10 at 12:38 pm

actually, need to:

# sysinstall
configure
options

then change the release name to 8.0-RELEASE and it works fine after that.

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>

Previous FAQ:

Next FAQ:

nixCraft FAQ PDF Collection Now Available To All