How i install the source code in FreeBSD?

I installed on my pc, FreeBSD 12.2 with xfce, when I type in the command
Code:
cd / usr / src / release
the message appears saying that the release directory does not exist, when I entered the file manager the src folder was empty, as do I download the source code?
 
I installed on my pc, FreeBSD 12.2 with xfce, when I type in the command
Code:
cd / usr / src / release
the message appears saying that the release directory does not exist, when I entered the file manager the src folder was empty, as do I download the source code?
you are using that cd sintax? or just for the example?
 
ls /usr/src
? If you have it, then you have it. If you don't:

mkdir /usr/src
pkg install security/ca_root_nss
svnlite checkout https://svn.freebsd.org/base/releng/12.2 /usr/src

Update:
svnlite update /usr/src

Clean-up (after failure: disconnected/interrupt):
svnlite cleanup /usr/src

Status:
svnlite status /usr/src

Info
svnlite info /usr/src

[EDIT] Correcting a mistake: unlock => cleanup
 
ls /usr/src
? If you have it, then you have it. If you don't:

mkdir /usr/src
pkg install security/ca_root_nss
svnlite checkout https://svn.freebsd.org/base/releng/12.2 /usr/src

Update:
svnlite update /usr/src

Unlock (after disconnected/interrupt):
svnlite unlock /usr/src

Status:
svnlite status /usr/src

Info
svnlite info /usr/src
It work!😆
 
  • Like
Reactions: a6h
I do a
Code:
git clone -o freebsd -b releng/13.0  https://git.FreeBSD.org/src.git    /usr/src

Followed by a regular
Code:
cd /usr/src
git pull --rebase
 
During the Base System installation process at the "Distribution Select" screen choose:

Code:
src
 
Back
Top