explaingit

freebsd/freebsd-src

9,074CAudience · developerComplexity · 5/5Setup · hard

TLDR

The complete source code for the FreeBSD operating system, kernel, shell, libraries, networking stack, and standard tools, maintained over thirty years and used in web servers, desktops, and embedded devices.

Mindmap

mindmap
  root((freebsd-src))
    What it is
      Full OS source
      Kernel and userland
      Thirty years active
    Directory layout
      sys kernel source
      bin and tools
      lib system libs
    Third-party code
      contrib components
      gnu GPL code
      cddl licensed
    Use cases
      Study OS internals
      Custom kernel build
      Contribute fixes
    Audience
      Systems developers
      OS researchers
Click or tap to explore — scroll the page freely

Code map

Detail Auto

An interactive map of this repo's files and how they connect — its source is parsed live in your browser. Click Visualize to build it.

filefunction / class

Things people build with this

USE CASE 1

Study the FreeBSD kernel source to understand how an operating system manages memory, processes, and networking at production scale.

USE CASE 2

Build a custom FreeBSD kernel with only the features your embedded device or router needs.

USE CASE 3

Contribute a bug fix or feature to FreeBSD by submitting a pull request through the GitHub mirror.

Tech stack

CAssemblyShellMake

Getting it running

Difficulty · hard Time to first run · 1day+

Building from source requires a supported platform and the FreeBSD Handbook, cross-compilation and custom kernels add significant extra complexity.

In plain English

FreeBSD is a full operating system, meaning it includes not just a kernel (the core that manages hardware) but also the shell, system libraries, networking stack, and standard command-line tools. This repository is the complete source tree for that entire system. It is published here as a read-only mirror, actual development happens through the FreeBSD project's own infrastructure, though the team is experimenting with accepting pull requests through GitHub. FreeBSD has been in continuous development for more than thirty years and powers a wide range of machines: web servers, personal desktops, and embedded devices like routers and storage appliances. Its networking, security, and storage subsystems are well-regarded in the industry, and several large internet companies have historically run it on high-traffic infrastructure. The repository is organized into clearly named subdirectories. The kernel lives in the sys folder. User-facing commands are split across bin, sbin, usr.bin, and usr.sbin. System libraries are in lib. Third-party software that the base system depends on is collected under contrib, gnu, and cddl, each grouped by the license it carries. There is also a stand folder for the boot loader, a crypto folder for cryptographic libraries, and a tests folder for automated testing via a tool called Kyua. Building FreeBSD from source is documented in the project's online handbook, which covers both building the userland (all the non-kernel parts) and compiling a custom kernel. The README points to those guides rather than reproducing them in full. Official pre-built disk images are available from the FreeBSD download site for anyone who does not need to build from source. The project supports multiple CPU architectures and hardware platforms, and a full list is maintained on the FreeBSD website.

Copy-paste prompts

Prompt 1
Walk me through building FreeBSD from source on a supported platform, what commands do I run and roughly how long does it take?
Prompt 2
I want to understand how FreeBSD networking handles TCP connections. Which source files in the freebsd-src repo should I read first?
Prompt 3
How do I compile a custom FreeBSD kernel that removes drivers I do not need to reduce image size for an embedded system?
Open on GitHub → Explain another repo

← freebsd on gitmyhub — every repo by this author, as a profile.

Verify against the repo before relying on details.