# freebsd kernel module - “make” command



## suraty (Feb 3, 2017)

Hello, I am a newbie in FreeBSD. I installed FreeBSD 11 on VMware. I want to write first FreeBSD kernel module. I find this link: How to write a FreeBSD Kernel Module

But in step3, after `make` command I get: 
	
	



```
unable to locate the kernel source tree. Set SYSDIR to override.
```

I searched it a lot, and I found that I should install kernel sources. But how can I do it? I want step by step guidance.
Please help me.
Thanks


----------



## tobik@ (Feb 3, 2017)

You can checkout the sources with either SVN or Git:

`svnlite co https://svn.freebsd.org/base/releng/11.0 /usr/src`

or

`git clone --single-branch -b releng/11.0 https://github.com/freebsd/freebsd /usr/src`


----------

