Netbase ports NetBSD userland utilities to other Unix systems
Summary
Netbase ports NetBSD utilities to other Unix-like OSes using compatibility libraries, minimizing source changes. It works on Linux (glibc/musl) and NetBSD, with experimental support for others. Build with ./build.sh.
Netbase ports NetBSD's userland to other systems
Netbase is a project that ports the userland utilities from the NetBSD operating system to other Unix-like platforms. Its goal is to bring these tools to different systems with minimal or no modifications to the original NetBSD source code.
The project provides a compatibility layer that makes this porting possible. This layer consists of specific header files and libraries that handle the differences between operating systems.
How the compatibility layer works
The porting magic happens in the compat/ directory. The compat/include folder contains headers that add necessary macros, like __COPYRIGHT and __RCSID, which might be missing on other systems.
Two key libraries reside in compat/libcompat: libnetbsd (also called libcompat) and libutil. Programs are linked statically against these libraries but dynamically with the rest of the host system.
This linking strategy means the programs gain the compatibility they need without creating new runtime dependencies for the end-user. The project maintainer notes this approach may change in the future.
Build requirements and process
Building Netbase requires a specific toolchain. You cannot use GNU Bison; you must use byacc. The other essential build tools are:
- gnu make
- clang and llvm
- zlib
- libbz2
- libfts (specifically for musl-based systems)
- A POSIX shell (like bash, linked to
/bin/sh)
Simply running make may fail. The recommended method is to use the provided ./build.sh script. This script runs make with the correct configurations and variables for your platform.
The build script accepts one primary option: -c or --clean to remove object files and clean the source tree.
Platform support and current status
Netbase aims for broad compatibility across Unix-like systems. The current support status for various platforms is as follows:
- Linux (glibc): Confirmed working.
- Linux (musl): Confirmed working.
- NetBSD: Confirmed working.
- FreeBSD & OpenBSD: Should work (indicated by a lab flask icon).
- macOS: Should work.
- GNU/Hurd: May work (proceed with caution).
The utilities have been tested primarily on Arch Linux and only with basic usage. The project maintainer explicitly requests that users report any build or runtime errors they encounter.
All available commands ported by the project are listed in the details/ directory.
Related Articles

Pi for Excel adds AI sidebar to Microsoft spreadsheets
Pi for Excel is an open-source AI sidebar for Excel. It reads and edits workbooks using models like GPT or Claude, with tools for formatting, extensions, and recovery.
Shoes GUI toolkit for Ruby returns after 16 years
Shoes, a simple Ruby GUI toolkit, vanished when its creator disappeared. Its legacy lives on in Scarpe, a modern version using webviews for cross-platform ease, aiming to revive _why's vision of accessible programming.
Stay in the loop
Get the best AI-curated news delivered to your inbox. No spam, unsubscribe anytime.
