A few questions about FreeBSD

  1. Where/how should I obtain the source code (ex. through terminal, Download off website)

  2. How (on ubuntu) should I build it?

  3. Before I build it can I customize it (in other words is possible)?

2 Answers 2


You can check the source for FreeBSD out of version control here. The developer's handbook answers a lot of questions about developing FreeBSD. Why aren't you building it from FreeBSD itself? It seems kind of... odd to be building from Ubuntu.

  • 3
    FreeBSD can be cross-compiled, else you wouldn't find it used in embedded systems. But in this case, I agree: probably not the right way to go about it. Apr 2, 2012 at 23:05
  • 1
    @WarrenYoung Can it? You can compile FreeBSD for another architecture, but compiling a whole FreeBSD system under Linux looks like it's more work than running FreeBSD in a VM. Apr 2, 2012 at 23:28
  • There's nothing magic about GCC running on FreeBSD as compared to a FreeBSD cross-dev version of GCC for Linux. All building on FreeBSD for FreeBSD would buy you is that you'd already have the right headers, libraries and dev tools in place already, assuming you're targeting the same OS version that you're running under. To cross-compile for FreeBSD under Linux, you'd have to build up the cross toolchain, then make copies of FreeBSD /lib, /usr/lib, /usr/include, etc., then point the cross-dev tools at those directories. Again, not advocating it, just pointing out it can be done. Apr 3, 2012 at 0:20
  • Oh, I agree, but the effort to get the toolchain and bits in place on a linux system seems like a lot of work.
    – jsbillings
    Apr 3, 2012 at 16:52
  • 3
    You'd also need the correct make version. The FreeBSD build system does not use GNU Make. Just don't bother: build FreeBSD on FreeBSD, Linux on Linux and Windows on Windows. To do otherwise is simply begging for pain and suffering. Apr 5, 2012 at 11:55

As of 2023, building FreeBSD on Linux and macOS is well-supported. E.g., building on Linux is part of FreeBSD's CI.

Chapter Building on non-FreeBSD Hosts in the FreeBSD Handbook describes that instead of make or bmake, a special wrapper script called tools/build/make.py should be used. The script is part of the FreeBSD src tree.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .