Front | Info | Lists | Newsfeeds | Study Guide | What is BSD? RSS  

Comparing BSD/OS and NetBSD

By Jeremy C. Reed

Even though the BSD/OS and NetBSD operating systems have been mostly developed by different developers with some different goals over the past nine years, they share many similarities due to their near identical open source origins and the open source software that complements the systems.

The main difference is the licensing. Where BSD/OS says "If you do not accept the terms of this license, immediately return the distribution to the place of purchase for a full refund," NetBSD simply says "Welcome to NetBSD!"

This series of articles quickly shares several of the similarities and important differences between the two operating systems. This article explains what's installed, what's running, and gives a few examples of basic configurations.

Upcoming articles will compare configurations in further detail, examples of updating software, hardware support, technical details, filesystem hierarchies, and other basic maintenance tasks. Plus, the articles will discuss migrating passwords, users and services; sharing each others' filesystems; and commercial updates and technical support.

What's installed?

The basic NetBSD install is quite lean compared to BSD/OS. This may be good if you don't want to keep track of a lot of software or have limited disk space, for example. On the other hand, you may have a lot of extra installing to do to have the same full-featured system.

By default, BSD/OS includes a whole variety of software like lynx, radiusd, snmp, swat (Samba configuration), sql-bench, imapd, bgpd, racoon (IPsec key management), innd (Usenet server), LPRng, hylafax, squid, Tk, unzip, and a lot more.

Both systems have the standard and common BSD and Unix tools under /bin, /sbin, /usr/bin, and /usr/sbin like sh, ls, date, mail, mount, fsck, traceroute, ntpdate, gunzip, pax, dig, and hundreds of other useful commands.

Some key software differences in default, bare minimum, installs:

  • NetBSD doesn't include bash nor tcsh, but does include ksh.
  • BSD/OS's tar is really a front-end to pax; NetBSD's tar is GNU tar.
  • NetBSD includes a fsck's for the Linux EXT2, Log-structured, and FAT (MSDOS) file systems.
  • BSD/OS has IPX/SPX (Novel Netware 3.11) services.
  • NetBSD has command-line utilities for audio, mixer and CD playing.
  • BSD/OS has perl family, an awk to perl translator, and Perl/Tk.
  • NetBSD includes rcs (and NetBSD 1.6 includes cvs) version control utilities.
  • BSD/OS has various ActivCard, CRYPTOCard and SNK-004 utilities.
  • NetBSD includes skey utilities.
  • BSD/OS has Apache HTTPD and related utilities and PHP.
  • NetBSD comes with postfix mail server (in addition to sendmail).
  • BSD/OS includes MySQL, gated, and a BGP4+ server (that also supports IPv6).

If you add the additional "contrib" packages, BSD/OS gains a lot more: such as Amanda backup utilities, antiword, MetaMail, a simple BASIC interpreter, calc, cdrecord, elm, exmh, expect, Glimpse, GNU make, GNU Chess, gnuplot, irc, emacs, mtools, pico and pine, ps2pdf, python, scotty, skey utilities, top, unzip, wish, xmms, various command-line image manipulation tools, and many other applications.

Of course, they have numerous similarities -- too many to list here. (In addition, I won't be discussing the X environment and X applications' differences and similarities in this article.)

Also, they both include statically linked /bin and /sbin executables, but BSD/OS has several of these tools that are extremely small because they weren't built against bloated libraries. For example, /bin/cat (under BSD/OS 4.2) is only 2,704 bytes compared to 51,196 bytes (on NetBSD/i386 1.5.2).

In BSD/OS terminology, a "package" is a tarball containing various files to unpack at install (or upgrade) time; for example, these tarfiles could be the core /var, initial configs, core /usr, networking (daemons), manual pages, et cetera. In NetBSD lingo, these installation tarfiles are called "sets" and packages are the files used for installing individual applications with corresponding setup scripts, configurations, documentation, and included utilities.

(In other words, a NetBSD package only contains files that are related to a specific application or theme; a BSD/OS package is a tarfile that can contain numerous entirely unrelated files. In fact, the core BSD/OS manual page package contains documentation for various applications that aren't even installed with the required core files.)

So to make a default NetBSD box include the same software as a BSD/OS box, you could use the "pkg_add" command to install different packages. The NetBSD project includes near 3,000 packages covering a wide variety of software, such as bonnie, everybuddy, mgetty, postgresql, vim, AbiWord, gnucash, Gnome, KDE, Canna server, SDL, ruby, CUPS, nessus, docbook, and Zope.

For example, you could configure your NetBSD pkg_add tool to use a local CD and a remote FTP site and then "pkg_add perl", "pkg_add racoon", "pkg_add bash", "pkg_add apache", and "pkg_add samba" (to get "swat").

What's running?

By default, a BSD/OS 4.2 system runs standard daemons like init, cron, syslogd, sendmail, sshd, and inetd. The inetd is listening to ftp, telnet, various r-services, finger, ntalk, POP3, imap, ident, comsat, Kerberized POP3 and r-services, and a few other standard internal services.

In addition, it runs:

  • asyncd, an asynchronous paging server for the kernel.
  • "gettyd -s" -- gettyd is for managing serial lines for dialin and dialout requests; the "-s" option doesn't allow logins.
  • mfs for the memory file system for /tmp.
  • portmap, statd, lockd, and nfsiod for an NFS environment.
  • And randomd for generating random numbers.
(Some of the kernel threads may be swapper, pagedaemon, and filesys_syncer.)

Netstat shows 26 listening ports, including Sendmail's Mail Submission Agent at port 587.

NetBSD is quite bare (and more locked down) compared to BSD/OS. It runs inetd -- but its config is entirely commented out so inetd isn't managing any ports. Plus, it is running syslogd, cron, a getty, and, of course, init. (Some of the kernel threads may be swapper, ioflush, reaper, pagedaemon, and usb0, for example.)

Basic Configurations

The basic configurations for BSD/OS are done in the /etc/netstart script. For example, you can set the hostname, default gateway, and configure a network card with:
You could do the same under NetBSD in a few different ways. The hostname can be configured for boot time by placing it in /etc/myname; or you can set the "hostname" variable (like above) in your NetBSD /etc/rc.conf file. The default gateway can be configured by setting the IP (or hostname which resolves in /etc/hosts) in the /etc/mygate file or by setting the "defaultroute" variable (in /etc/rc.conf).

Setting up the interface can also be done different ways, like having an /etc/ifconfig.fxp0 file with the line:

Or have a variable named "ifconfig_fxp0" set to that information. (It can also contain "netmask" and other ifconfig arguments.)

With BSD/OS, to configure different networking or services to start up at boot time, you'll need to look through the /etc/netstart and /etc/rc scripts. Often, a service can be started at boot, simply by just having a config file in place. (For example, if a /etc/named.conf file exists, then the BIND DNS server will be started at boot.) Also, you will need to manually order any of your startup code in /etc/rc or /etc/rc.local to make sure a service starts only after any needed prerequisites.

The NetBSD startup is a little more organized and easier to follow. A file at /etc/defaults/rc.conf contains all the default settings, and you make any changes by modifying the /etc/rc.conf file. The /etc/rc.d/ directory contains various scripts (such as dhclient, cron, mountcritlocal, network, and named) that have special tags that help indicate what each requires or provides and then these scripts are ran in order.

For example, to configure OpenSSH server and postfix to start at boot time, then your /etc/rc.conf file could contain (at end):


BSD/OS boxes log process accounting by default; to do the same with NetBSD simply "touch /var/account/acct" and then add "accounting=Yes" to end of /etc/rc.conf. Then to start it without rebooting, you can run "/etc/rc.d/accounting start".

(Note that although it may look like a SysV init.d system, NetBSD's rc.d scripts are different and are a better organized way for starting up tasks in order.)

Also several configurations are done the same. You can set up TCP Wrapper rules in the /etc/hosts.allow and /etc/hosts.deny files. (Note that BSD/OS uses tcpd wrapper for its inetd, but NetBSD has libwrap built in.) Nameservers can be defined in /etc/resolv.conf and local name and IP resolution can be done in /etc/hosts.

In the upcoming articles, you will find that NetBSD and BSD/OS are a lot more similar than they are different.

Join our weekly announcement mailing list for a weekly report of latest BSD news (and updates to articles). Mailing list information is available here.


Discuss this article below.

Descriptions descriptions... - Niklas
Almost content-free - Stanley Choad
good article - nuke
threads? - Scott Walters
very superficial review, missed key points - christian
BSD/OS vs FreeBSD - Dave Greene
BSD family tree - David Brownlee
BSD Unix - Edmund P. Morgan
386BSD - Marco Beck
That's GNU/Linux - Tim McNamara

Descriptions descriptions...
Niklas - July 17, 2002 05:25:27
It'd be more interesting telling a bit more about how the two BSDs are being developed and what aims the developers have that produce these differences.

Almost content-free
Stanley Choad - July 18, 2002 17:55:20
It would be nice if this article took a look under the hood... of course the userland's almost the same, it's a BSD.

good article
nuke - July 20, 2002 17:55:05
dunno about the rest of you guys, but i definitely liked this article!

it answered a newby problem ive wondered about for ages now: where in the scripts to make sshd & postfix enabled on startup? the manpages dont say. :-(

but the answer was here.

thanks jeremy!

Scott Walters - July 25, 2002 12:06:03
Did someone say kernel threads? Its frequently reguarded that BSD/OS is a rock solid system, and some of the core BSD team continued to hack on it for years. Its obvious that they accomplished more than just installing some userland programs. I'd love to see the changelog for BSD/OS since 4.3.


very superficial review, missed key points
christian - July 30, 2002 03:39:23
No offense, but this sounds like something you wrote at the last minute. Really, packages are just packages - they don't make an O/S. I thought it was strange that you didn't go into the history of BSD or why NetBSD diverged from FreeBSD to begin with.

The original BSD Unix was put together by Bill Joy, who also gave us vi and csh. Of course, Bill went on to found Sun Microsystems, as everyone knows. This was in the 70's - Cal Berkeley was collaborating with AT&T on the development of Unix. Indeed, the first Sun OS was BSD based; later versions were based on AT&T System V.

Due to legal reasons, BSD Unix could not be given away because it contained AT&T source code, which AT&T closed in 1979. A version of BSD OS was created that had been scrubbed free of System V code; this version was intended to be given away, hence it's name, FreeBSD. NetBSD is a child of FreeBSD; BSD OS continued it's development and may contain some vestigial System V code which is the reason it's a commercial product.

Of course, AT&T even tried to block Cal Berkeley from giving away FreeBSD. The case was tied up in court for years in the early 90's, the same time that a guy from Finland started work on a funny little project which was meant to provide the same thing FreeBSD offered - a full featured Unix system for the x86 platform. If the timing had been a little bit better, that little red Daemon would be conquering the world right now instead of that blasted penguin!

NetBSD one-ups FreeBSD. The NetBSD people rewrote any x86 specific code in FreeBSD in order to create what must truly be the most portable OS in the world. NetBSD will run on your friggin' toaster! (Just kidding. Maybe next year's toaster from Sony ;) ) This is it's strength - I wonder why you didn't mention this?

I would have loved to hear more about the internals here...

my 2 cents worth.

Dave Greene - August 06, 2002 15:45:20
From my understanding, BSD/OS is not FreeBSD. Even under the What is BSD, BSD/OS and FreeBSD are listed seperatly. I was assuming that BSD/OS was more notably what was BSDi, but I could be wrong. Can someone clear that up?

Thanks, and interesting article by the way, though a bit light.

BSD family tree
David Brownlee - August 26, 2002 10:13:47
NetBSD, FreeBSD, and BSD386(now BSD/OS) all came from Bill Joy's 386BSD (NetBSD was actually released slightly earlier than FreeBSD to clarify christian's posting :). 386BSD was itself a child of 4.4BSD (via the Net/2 tapes). Since then there has been a degree of cross-polination with drivers and userland updates moving in all directions.

BSD Unix
Edmund P. Morgan - September 17, 2002 22:49:52
Remember without Bill Joy having tapes from AT&T containing AT&T Unix source code, there would have been no BSD Unix.

Marco Beck - September 12, 2003 19:26:23
One correction to David's posting: s/Joy/Jolitz/

That's GNU/Linux
Tim McNamara - February 02, 2004 00:00:21
"Of course, AT&T even tried to block Cal Berkeley from giving away FreeBSD. The case was tied up in court for years in the early 90's, the same time that a guy from Finland started work on a funny little project which was meant to provide the same thing FreeBSD offered - a full featured Unix system for the x86 platform."

Let's be accurate. Richard Stallman and the GNU Project had built almost all of the operating system but were missing that key ingredient- the kernel. "That guy" in Norway came up with teh kernel, the two projects were knitted together and voila- GNU/Linux.

I've never run GNU/Linux, all my Unix experience is BSDish (NetBSD 1.4.3 and 1.6.1; and Mac OS X). I use a fair amount of GNU applications. Long live free software (as in free speech).





Stop Spam Abuse: What operating system's CVS history begins in March 1993?

BSD Links

· Advocacy
· Drivers
· Events
· Flavours
· FAQs
· Guides
· Programming
· Security
· Software
· User Groups

September 16, 2013 11:24:28

Front | Information | Lists | Newsfeeds | Study Guide