# Obtaining kernel sources after installation



## Robert Kopp (Dec 2, 2020)

I need to have kernel sources installed in /usr/src, but I did not install them at the time my system was installed. I should have done so, since I have an Nvidia GPU. (12.2-RELEASE, amd64.) If someone has instructions that would save time as compared to repeating the installation, I would appreciate it.


----------



## Robert Kopp (Dec 2, 2020)

This appears to populate /usr/src:
`svnlite checkout https://svn.freebsd.org/base/releng/12.2 /usr/src`
Shortly I'll know if it's what I need.


----------



## George (Dec 2, 2020)

Yaah, these commands are fine.

Downloading the source code is described in the handbook.








						Chapter 25. Updating and Upgrading FreeBSD
					

Information about how to keep a FreeBSD system up-to-date with freebsd-update or Git, how to rebuild and reinstall the entire base system, etc




					www.freebsd.org


----------



## VladiBG (Dec 2, 2020)

For initial download is faster to download the archive of src.txz and extract it. Then you can use svnlite or freebsd-update for updating the src

for 12.2-RELEASE , amd64
`cd /tmp
fetch ftp://ftp.freebsd.org/pub/FreeBSD/releases/amd64/12.2-RELEASE/src.txz
tar -C / -zxvf src.txz
rm /tmp/src.txz`


----------

