I stumbled upon the bsdutils package in Debian. The description says:

This package contains the bare minimum of BSD utilities needed for a Debian system: logger, renice, script, scriptlive, scriptreplay and wall. The remaining standard BSD utilities are provided by bsdextrautils.

Similarly, the description of bsdmainutils also mention BSD:

This package contains lots of small programs many people expect to find when they use a BSD-style Unix system.

I was surprised to see that these packages relates to BSD, in the context of a Linux system.

Do these packages use some code from BSD? What is a BSD-style Unix system?

  • Some Linux distros actually have had projects to run on BSD, so this is not as far-fetched as it might sound. Debian was one of them, and it looks like their ‘kFreeBSD’ project is still around, albeit in not a particularly great state. Dec 9 '21 at 12:52

In the beginning, there was Unix, which was a product developed by Bell Labs (a subsidiary of AT&T). A lot of groups customized their copy and added their own programs, and shared their improvements with others (for pay or for free).

One such group was the University of California, Berkley (UCB). They shared the Berkeley Software Distribution (BSD) under a very liberal license (known today as the original BSD license). Originally, this was a set of additions to the basic Unix. Eventually, they rewrote the complete operating system, so that it could be used without getting a license from AT&T.

Apart from BSD, the main suppliers of Unix operating systems were computer vendors who sold the operating system with the computer. Some kept basing their operating system on the AT&T version. These systems are known as the System V family, because it was based on this version of AT&T Unix. Other vendors used the BSD version. Some made their own, with the goal of being broadly compatible with the two main players (System V and BSD) but each with their own specifics. A “System V operating system” is a system that is more compatible with AT&T Unix. A “BSD operating system” is a system that is more compatible with BSD.

GNU was another project to make an operating system that could play the same role as BSD: freely available, and with the same kinds of features as Unix. GNU was much more ambitious than BSD, but as a result they didn't manage to do everything they wanted, and in particular they were missing a critical bit: a kernel. In the 1990s, Linux became the de facto standard kernel for GNU, and an operating system based mostly on GNU core programs on a Linux kernel is known as “Linux”, or sometimes “GNU/Linux”.

GNU/Linux has its own history that's independent from System V and BSD, so it doesn't have all the features that all actual System V systems share, or all the features that all actual BSD systems share. Debian's bsdutils and bsdmainutils are collections of small programs that are typically present on BSD systems, but not part of the core that is present on all Unix systems.

The bsdutils collection is from util-linux. They're programs with similar interfaces to the BSD utilities with the same name, but most if not all were written completely independently, and they're distributed under a GNU license. bsdmainutils is a collection of programs copied from a BSD collection, still distributed under a BSD license. They're now maintained by Debian, but they pick up some improvements made by BSD distributions.

  • 2
    Don't forget bsdgames, that has my favorite tetris, tetris-bsd !
    – gboffi
    Dec 8 '21 at 21:01
  • bsdmainutils has been mostly replaced by util-linux in Debian 11; the only remnants are ncal and calendar, everything else comes from util-linux now. (As might be expected a lot of the code in the relevant utilities has the same origin.) Dec 8 '21 at 21:55
  • In the before the beginning, there was multics
    – mcalex
    Dec 10 '21 at 7:04

These are all tools which originally came from BSD (4.4BSD). Their usefulness isn’t based on their origin; they’ve been included in Linux distributions for a long time, and in fact the current packages in Debian use code provided by util-linux (source).

A BSD-style Unix system is one which includes BSD utilities, and possibly BSD libraries; for example, SunOS is a BSD-style Unix system, HPUX isn’t. See Éric Lévénez’ Unix History for a family tree showing the lineages.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.