
Introduction
BSD originally inherited from UNIX. Currently, there are many Unix-like operating systems based on BSD. FreeBSD is the most widely used open-source Berkeley Software Distribution (i.e., BSD distribution). As its name implies, it is a free and open-source Unix-like operating system and a popular public server platform. FreeBSD source code is typically released under the permissive BSD license. It shares many similarities with Linux, but we must acknowledge that they differ in many ways.
The remainder of this article is organized as follows: a description of FreeBSD is in the first section, the similarities between FreeBSD and Linux are in the second section, their differences will be discussed in the third section, and a discussion and summary of their features concludes the article.
Description of FreeBSD
History
- The first version of FreeBSD was released in 1993. Its first CD-ROM was FreeBSD 1.0, released in December 1993. Next, FreeBSD 2.1.0 was released in 1995 and gained the favor of all users. In fact, many IT companies use FreeBSD and are very satisfied with it; we can list some of them: IBM, Nokia, NetApp, and Juniper Network.
License
- Regarding its license, FreeBSD is distributed under multiple open-source licenses. Its latest code, known as the Kernel, is released under the two-clause BSD license, granting absolute freedom to use and redistribute FreeBSD. Other code is released under the three-clause or four-clause BSD license, and some is released under the GPL and CDDL licenses.
(LCTT Note: The BSD license is quite brief compared to the GPL license, initially consisting of only four clauses. In 1999, at the request of RMS, the third clause was removed, and the new license is called “New BSD” or the three-clause BSD. The original BSD license is called “Old BSD,” “Revised BSD,” or the four-clause BSD. There is also a version with both the third and fourth clauses removed, called the two-clause BSD, which is equivalent to the MIT license.)
Users
- One of the important features of FreeBSD is its diversity of users. In fact, FreeBSD can serve as a mail server, web server, FTP server, router, and more 鈥?you just need to run the relevant service software on it. Moreover, FreeBSD supports ARM, PowerPC, MIPS, x86, and x86-64 architectures.
Similarities Between FreeBSD and Linux
FreeBSD and Linux are both free and open-source software. In fact, their users can easily inspect and modify the source code, enjoying absolute freedom. Moreover, both FreeBSD and Linux are Unix-like systems; their kernels, internal components, and library programs all use algorithms inherited from historical AT&T Unix. FreeBSD is fundamentally more Unix-like, while Linux was released as a free Unix-like system. Many utility applications can be found in both FreeBSD and Linux, and in practice, they have nearly identical functionality.
Additionally, FreeBSD can run a large number of Linux applications. It can install a Linux compatibility layer, which can be obtained by including AAC Compact Linux when compiling FreeBSD, or by downloading a FreeBSD system with the Linux compatibility layer already compiled, which includes the compatibility module: aac_linux.ko. Unlike FreeBSD, Linux cannot run FreeBSD software.
Finally, we note that although both share the same goal, there are still some differences between the two, which we list in the next section.
Differences Between FreeBSD and Linux
Currently, there is no clear-cut rule for most users on whether to choose FreeBSD or Linux, because they share many of the same applications and are both called Unix-like systems.
In this section, we will list some of the key differences between these two systems.
License
- The first difference between the two systems lies in their licenses. Linux is distributed under the GPL license, which gives users the freedom to read, distribute, and modify source code. The GPL license helps users avoid distributing only binaries. FreeBSD, on the other hand, is released under the BSD license, which is more permissive than the GPL because derivative works do not need to remain under the same license. This means any user can use, distribute, and modify the code without needing to preserve the previous license.
- You can choose between the two licenses according to your needs. First is the BSD license, which, due to its special terms, is more favored by users. In practice, this license allows users to keep source code closed while selling software released under this license. As for the GPL, it requires every user of software released under this license to pay extra attention.
- If you want to choose between two types of software released under different licenses, you need to understand their respective licenses as well as their development methodologies, so you can understand the differences in their features and choose the one that better suits your needs.
Control
- Since FreeBSD and Linux are released under different licenses, Linus Torvalds controls the Linux kernel, whereas FreeBSD, unlike Linux, is not controlled by any single individual. I personally prefer using FreeBSD over Linux because FreeBSD is truly free software with no controlling license involved. There are other differences between Linux and FreeBSD as well; I suggest you not rush to make a choice and wait until you finish reading this article before deciding.
Operating System
- Linux primarily refers to the kernel system, which is different from FreeBSD, where the entire system is maintained. FreeBSD’s kernel and a set of software developed by the FreeBSD team are maintained as a single whole. In fact, FreeBSD developers can remotely and efficiently manage the core operating system.
- On the Linux side, managing the system presents some difficulties. Since different components are maintained by different sources, Linux developers need to bring them together to achieve the same functionality.
- Both FreeBSD and Linux offer users a large amount of optional software and distributions, but the way they manage them is different. FreeBSD adopts a unified management approach, while Linux needs to be maintained separately.
Hardware Support
- When it comes to hardware support, Linux does a better job than FreeBSD. But this does not mean FreeBSD lacks the ability to support hardware like Linux does. They simply differ in their management approaches, which usually also depends on your needs. Therefore, if you are looking for the latest solutions, FreeBSD is better suited for you; but if you are looking for broader versatility, it is best to use Linux.
Native FreeBSD vs. Native Linux
- The difference between the native systems of the two is also distinct. As I mentioned earlier, Linux is a Unix replacement system, written by Linus Torvalds and collaboratively implemented with the help of many geeks across the network. Linux has all the features required by a modern system, such as virtual memory, shared libraries, dynamic loading, excellent memory management, and so on. It is released under the GPL license.
- FreeBSD also inherits many important features of Unix. FreeBSD is a distribution of BSD developed at the University of California. The most important reason for developing BSD was to replace the AT&T operating system with an open-source system, thereby giving users the ability to use it without an AT&T license.
- The licensing issue is what developers care about most. They attempted to provide an open-source system that maximally clones Unix. This affects the user’s choice, as FreeBSD is released under the BSD license and is therefore more free compared to Linux.
Supported Packages
- From the user’s perspective, another area where the two differ is the availability and support of software packages and software installed from source. Linux only provides precompiled binary packages, which is different from FreeBSD, which not only provides precompiled packages but also offers a build system for compiling and installing from source. Using its ports tool, FreeBSD gives you the choice between using precompiled packages (default) and customizing your software at compile time. (LCTT Note: This description is inaccurate. Linux also provides source-based packages and supports self-building.)
- These ports allow you to build all software supported by FreeBSD. Moreover, their management is hierarchical; you can find the source file locations and documentation on proper FreeBSD usage under /usr/ports.
- The mentioned ports give you the possibility to produce different versions of software packages. FreeBSD offers you both source-built and precompiled software, rather than only precompiled packages as Linux does. You can manage your system using both installation methods.
Comparison of Common Tools Between FreeBSD and Linux
- A large number of common tools are available on FreeBSD, and interestingly, they are owned by the FreeBSD team. In contrast, Linux tools come from GNU, which is why there are some restrictions in their use. (LCTT Note: This is also why the formal name for Linux is called “GNU/Linux,” because Linux essentially refers only to the kernel.)
- In practice, the BSD license adopted by FreeBSD is very beneficial and useful. Therefore, you have the ability to maintain the core operating system and control the development of these applications. Some tools resemble their ancestors 鈥?the tools of BSD and Unix 鈥?but differ from the GNU suite, which only aims for minimal backward compatibility.
Standard Shell
- FreeBSD uses tcsh by default. It is an enhanced version of csh. Since FreeBSD is released under the BSD license, it is not recommended to use the GNU component bash shell in it. The difference between bash and tcsh lies only in tcsh’s scripting capabilities. In practice, we recommend using the sh shell in FreeBSD because it is more reliable and can avoid some scripting issues that arise when using tcsh and csh.
A More Hierarchical File System
- As mentioned earlier, when using FreeBSD, the base operating system and optional components can be easily distinguished. This leads to some standards for managing them. Under Linux, /bin, /sbin, /usr/bin, or /usr/sbin are all directories where executable files reside. FreeBSD is different; it has additional specifications for organizing them. The base operating system is placed in /usr/local/bin or /usr/local/sbin directories. This approach helps with managing and distinguishing the base operating system from optional components.
Conclusion
FreeBSD and Linux are both free and open-source systems. They have similarities as well as differences. The content listed above cannot say which system is better than the other. In practice, FreeBSD and Linux each have their own characteristics and technical specifications, which set them apart from other systems. So, what do you think? Are you already using one of these systems? If the answer is yes, please give us your feedback; if the answer is no, after reading our description, what is your opinion? Please share your views in the comments section.
via: http://www.unixmen.com/comparative-introduction-freebsd-linux-users/