Comparing GNU/Linux and FreeBSD
The real winner is the community
Download the whole article as PDF
Short URL: http://fsmsh.com/1379
- 2007-05-30
- Server side | Intermediate
-
Write a full post in response to this!
This content was sponsored by:
GNU/Linux is the most popular operating system built with free/open source software. However, it is not the only one: FreeBSD is also becoming popular for its stability, robustness and security. In this article, I’ll take a look at their similarities and differences.
Introduction
FreeBSD is an operating system based on the Berkeley Software Distribution (BSD), which itself is a modification of AT&T’s UNIX, and was created by the University of California. During the development of FreeBSD, to avoid any legal problems with the owners of the source code, the developers decided to re-engineer the original BSD, rather than copy the source code.
In contrast with GNU/Linux, where all the pieces are developed separately and brought together in distributions, FreeBSD has been developed as a complete operating system: the kernel, device drivers, sysadmin’s tools and all the other pieces of software are held in the same revision control system.
Initial development of Linux was started in 1991 by Linus Torvalds who used Minix—an operating system developed by Andrew Tanenbaum for teaching purposes—as the basis for his system. By 1990 the GNU project, which had been started in 1983 by Richard Stallman, had produced and collected all the libraries, compilers, text editors, shells and other software necessary to make a free operating system—except a kernel. The Linux kernel developers decided to adapt their kernel to work with the GNU software to make a complete operating system: GNU/Linux was born.
The kernel and the majority of the code in FreeBSD has been released and distributed under the BSD license although some components use other open licenses like the GPL, the LGPL or the ISC. The Linux kernel, and most of the software in the GNU project, has been licensed under the GNU GPL which was created by the Free Software Foundation.
Technical differences
FreeBSD and Linux both follow the UNIX philosophy but some differences do exist between the operating systems—let’s have a look at some of these differences on a technical level.
Devices
Hardware related dispositives like disks, network cards, printers, graphics cards, mice and keyboards are referred to using the term device in the context of operating systems; Linux and FreeBSD use different nomenclature for this hardware.
Linux uses predefined names for each device type, so eth0 is the first Ethernet network card for any chip-set. FreeBSD, on the other hand, uses a different name for each device and their chip-set: for example, a single network card with the common RealTek 8129 chip-set is called rl0 in FreeBSD.
On Linux hardware information can be obtained by examining the content of the /proc directory; a command like lspci or lsusb can also be used—these commands simply reformat the information contained in /proc. FreeBSD does not use the /proc directory, rather the sysctl command shows all the information about the hardware devices attached to the system and can also be used for configuring and tuning them.
Runlevels and startup scripts
Runlevel is the term used to describe a mode of operation for a system such as reboot, halt, single-user mode or multi-user mode. On GNU/Linux the /etc/inittab file describes these different runlevels and the init process allows the system to change its current runlevel. FreeBSD uses commands like reboot or shutdown -h to change the current runlevel instead of the telinit command used in GNU/Linux.
On GNU/Linux each runlevel has a subdirectory under /etc/ or /etc/rc.d/, depending on the distribution: Debian, for example, uses /etc/. These subdirectories are rc0.d, rc1.d and so on until the last runlevel (there are usually seven runlevels). Each rc_x_.d subdirectory contains symbolic links to the startup scripts residing in the /etc/init.d/ directory.
On FreeBSD the startup scripts exist in the /etc/rc.d/ directory (for the system) and in the /usr/local/etc/rc.d/ directory (for third-party applications). These scripts use parameters such as start or stop to control which scripts run at startup (start and reboot) and shutdown.
Kernel
Obviously there exist design differences between the Linux kernel and the FreeBSD kernel but there are also similarities:
- Modules: support for loading and unloading modules without recompiling the kernel or rebooting the system.
- Versions: each official kernel uses a numbered version.
- Build a custom kernel: some benefits of building a custom kernel are that it can result in a faster boot time, lower memory usage and additional hardware support.
Commands for loading and unloading kernel modules, as well as listing the loaded modules, are different in each system. Linux uses the modprobe command for loading a module and for seeing a list of the loaded modules, lsmod just shows a list of the loaded modules and rmmod unloads any unwanted modules. FreeBSD uses kldstat to list the currently loaded modules, kldload for loading a module and kldunload for removing a module.
Write a full post in response to this!
Similar articles
Do you like this post?
Vote for it!
Copyright information
Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.2 or any later version published by the Free Software Foundation; with no Invariant Sections, no Front-Cover Texts, and no Back-Cover Texts. A copy of the license is available at http://www.gnu.org/copyleft/fdl.html.
Biography
Arturo Fernánde...: Arturo is a software engineer specialist in web development and a freelance author for various Linux magazines. He works with Debian GNU/Linux since 2000.
- 180982 reads
- Printer friendly version (unavailable!)




Best voted contents
-
Special 301: FOSS users. Now we're all Communists and Criminals
Gary Richmond, 2010-03-05 -
Microsoft's Internet Driving Licence: stupid, unworkable and unenforceable
Gary Richmond, 2010-03-10 -
The Bizarre Cathedral - 69
Ryan Cartwright, 2010-03-12 -
Interview: Nina Paley (author of "Sita Sings the Blues" and the two "Minute Meme" animations)
Terry Hancock, 2010-03-15
Buzz authors
Free Software news
- guaka: http://chdk.wikia.com/ #awesome #freesoftware for my #canon #ixus http://casarobino.org/node/10395
- http://chdk.wikia.com/ #awesome #freesoftware for my #canon #ixus
- Eben Moglen vs The Cloud: http://ur1.ca/q70n #fsf #cloudcomputing #freesoftware
- Op-ed from @eximious on Women in #FreeSoftware. *cough* *cough* Come to Libre Planet to discuss such topics. http://bit.ly/c1aWk9
- You can download video/audio of the Richard Stallman lecture from Feb 17th now! http://csee.wvu.edu/rms/#download #freesoftware
Similar entries
Other sites
- The Top 10 Everything (Dave). The good, the bad and the ugly.
- Free Software news (Dave & Bridget). All about free software -- free as in freedom!
- Book Reviews: Illiterarty (Bridget). Book reviews, blogs, and short stories.
Hot topics - last 60 days
-
Linux performance: is Linux becoming just too slow and bloated?
Mitch Meyran, 2010-01-26 -
Web code is already open - why not make it free as well
Ryan Cartwright, 2010-01-20 -
Save "Sita Sings the Blues" from the Flash format: can you convert FLA?
Terry Hancock, 2010-01-29 -
Microsoft's Internet Driving Licence: stupid, unworkable and unenforceable
Gary Richmond, 2010-03-10 -
Special 301: FOSS users. Now we're all Communists and Criminals
Gary Richmond, 2010-03-05
Hot topics - last 21 days
-
Microsoft's Internet Driving Licence: stupid, unworkable and unenforceable
Gary Richmond, 2010-03-10 -
Special 301: FOSS users. Now we're all Communists and Criminals
Gary Richmond, 2010-03-05 -
The Bizarre Cathedral - 69
Ryan Cartwright, 2010-03-12 -
Interview: Nina Paley (author of "Sita Sings the Blues" and the two "Minute Meme" animations)
Terry Hancock, 2010-03-15
Odiogo
Free Software Magazine uses Apollo, project management and CRM for its everyday activities!


