FreeBSD versus Linux

This article compares FreeBSD and Linux across several technical and non technical factors.

Pricing
Both operating systems are free. FreeBSD is available freely on the internet. For those users who do not have an internet connection, FreeBSD can be purchased on a set of 4 CDROMs, along with all supporting documentation for USD 40. Support is free and there is no licensing cost involved. Similarly for Linux, it is available freely, documentation is easily available, support is free and there are no licensing costs.

Performance:
FreeBSD scores over Linux in this area. FreeBSD has a reputation for offering a reliable performance under extreme load conditions, as compared to other systems. Companies like Yahoo! and Quest which have high traffic run their main servers on FreeBSD as does the busiest internet public server on the internet: at ftp.freesoftware.com. Linux does not perform optimally under high loads; its capacity being 20-30% lower than that of FreeBSD running on equivalent hardware.

Free Applications:
Both FreeBSD and Linux offer several free applications. FreeBSD has several software packages along with a big ports collection available freely, including the source code.

Code Development
The systems differ here. For FreeBSD, there is a team of more than 200 senior developers working on it and the complete source code is available in a central repository. In the case of Linux, all bug fixes and enhancements are done on mailing lists with Linus Torvaldis having the sole authority to add/modify the code.

Shells
Most GNU/Linux distributions use the Bash (Bourne-Again SHell) as the default shell, since this shell was written for the GNU project specifically. Like most traditional UNIX systems, FreeBSD uses csh. Bash can be installed easily in a FreeBSD installation by using the command # pkg_add -r bash. Other shells like csh or tcsh can be installed in either operating system.

Hardware Nomenclature
FreeBSD uses the sysctl command which gives all details about the hardware devices attached to the system. This command can also be used to configure and tune these devices. Linux, on the other hand, makes use of commands like lspci or lsusb to display hardware information. While FreeBSD has a separate name for each device and chipset, Linux uses predefined names for each device type.

Runlevels and startup scripts
In GNU/Linux, different runlevels are described in the /etc/inittab file and the system can change its current runlevel by utilizing the init process. FreeBSD, on the other hand, makes use of commands like reboot or shutdown -h to change the current runlevel. In Linux, each runlevel has a subdirectory under /etc/ or /etc/rc.d/. These subdirectories are rc0.d, rc1.d and so on until the last runlevel. In FreeBSD, all startup scripts are part of the /etc/rc.d/ directory (for the system) and in the /usr/local/etc/rc.d/ directory (for third-party applications).

Development Environment
Both Linux and FreeBSD have the same development tools, including compilers and interpreters for most programming languages. Linux applications however, cannot be compiled on one system and run on the other.