TranslateProject/sources/talk/20150310 FAQ--BSD.md

81 lines
8.7 KiB
Markdown
Raw Normal View History

2015-03-10 16:22:12 +08:00
FAQ: BSD
================================================================================
![](http://www.linuxvoice.com/wp-content/uploads/2015/02/faq1-large1.png)
### Had history been slightly different, youd be reading FreeBSD Voice today… ###
#### So whats the deal with this Birsa Seva Dal then? Isnt it a political group in India? ####
Very funny you looked up the “BSD” disambiguation page on Wikipedia just to make that joke, didnt you? Here were talking about the Berkeley Software Distribution, a family of operating systems that are much more widely used than you might think.
#### Sorry, I couldnt help myself. OK, so whats the deal with these OSes? ####
There are three main BSD operating systems in use today. They are based on Unix, they are open source, they tend to be used in server roles, but can also make good desktops and workstations as well. They run KDE, Firefox, LibreOffice, Apache, MySQL and pretty much any open source application you can name. Theyre reliable, secure and support a lot of different hardware.
#### Congratulations youve just described GNU/Linux… ####
True. Linux has all of the things Ive just mentioned, and thats why a lot of people never investigate BSD. In day-to-day usage, there isnt a lot of difference between the BSD family and Linux, largely because they all have Unix underpinnings, and also because they share a lot of software. You could be logged into a remote machine, hacking some Python code in Vim, and checking your email in Mutt, and you wouldnt know you were running BSD. Or you could be using an internet terminal in a cafe somewhere and not know its BSD.
The biggest differences are in the development model and licence, and to understand this, we need to step back in time. The B in BSD refers to the University of California, Berkeley, which was a hotbed of open source Unix development back in the 1980s. As the 90s came, x86-based PCs were becoming popular and many people were interested in having a Unix-like OS on their home computers. A project called 386BSD was released in 1992 to provide just that.
#### And where were all the Linux distributions at this time? ####
Good question! You might know that one year before, Linus Torvalds had announced his kernel, which, when paired with the GNU project, formed a complete open source operating system. Linus had been following GNUs own kernel (Hurd) and 386BSD, and said that had either of them been ready for daily use, he probably wouldnt have created Linux. So the first few years of the 90s were tremendously lively for open source operating systems, and nobody was really sure which ones would succeed.
Then it got messy for BSD. AT&T, the original developer of Unix, was trying to monetise its work on the operating system and claimed that BSD infringed its intellectual property rights. This culminated in a lawsuit in 1992 which severely held back BSD development. In the end, various chunks of the BSD source code had to be rewritten while all this time, GNU/Linux was gaining features, stability and popularity.
BSD was arguably in a more mature state than GNU/Linux in the early 1990s, and without these legal complications it could have become the standard on x86 PCs. We could all be using it today instead of Linux.
#### But you said earlier that BSD is still widely used, so things improved after that? ####
Yes. 386BSD development stagnated, but two teams of developers working over the internet created separate successor projects. FreeBSD became the most widely used flavour of BSD, and is now the closest to Linux as a desktop and server operating system, while NetBSD focused on portability (today it runs on over 50 platforms, all built from the same codebase). The third flavour, OpenBSD, forked off from NetBSD just a few years after NetBSD started due to a developer spat, and today its well known for its concentration on security. Over the years, OpenBSD has created many programs that have become standard on Linux, such as OpenSSH and now we have LibreSSL too.
#### So these three flavours of BSD are like Linux distributions? ####
Yes and no. Each BSD has a separate codebase and separate development teams, although there is a lot of code-flow between them (especially for hardware drivers). But they are standalone operating systems with their own features, pros and cons.
We mentioned that the development model of the BSDs is one feature that really distinguishes them from GNU/Linux. Theres nobody in charge of GNU/Linux as a whole: some teams are working on the GNU components, some are working on the kernel, some on boot scripts, some on manual pages, some on libraries, and so forth. The development model is often called “wild west”, with a lack of central authority, and distributions do all the hard work of fitting everything together.
The BSDs, in contrast, are developed as complete projects from centralised source code trees. The kernel, the libraries, the system utilities and the manual pages are all stored and worked on in the same place. Many BSD fans argue that this gives the operating systems more coherency and stability, and from our years of dabbling with BSD we can attest that the manual pages are largely superb.
![](http://www.linuxvoice.com/wp-content/uploads/2015/02/faq2-large1.png)
#### Dont the BSDs use anything from GNU/Linux? ####
Yes, especially GCC. The GNU Compiler Collection has been the de-facto standard compiler on free Unix systems for decades, although FreeBSD has recently moved to LLVM/Clang. Its important to note that the BSDs also use other open source projects that arent specifically GNU or Linux, such as the X Window System (XFree86 and X.org), Perl and so forth. And thanks to standards such as POSIX, most programs that run on Linux can be recompiled to run on the various BSD flavours.
So, you could replace the L in a LAMP (Linux, Apache, MySQL and PHP) stack with FreeBSD, and get pretty much the same environment, with a different set of features (eg variations in filesystem and driver support). And there are some mega, super, huge users of FreeBSD, such as Netflix, which serve up ridiculous amounts of data every day. While FreeBSD makes a good desktop OS, its strengths really lie in the server room, with exceptional reliability and network performance.
OpenBSD tends to be used in smaller web serving, file hosting, firewall and gateway roles where security is imperative. NetBSD is the least popular of the main BSD flavours it can run on almost anything though, including old Amigas and Acorn boxes, and sometimes finds itself inside closed-source network devices.
#### Hang on how can someone close the source code? That aint kosher in Linux! ####
Correct, and here we come to the other major difference with GNU/Linux. The licence for the BSD flavours (called, funnily enough, the BSD Licence) is very different to the GPL that we know. For starters, its much shorter. The BSD Licence essentially says: do what you want with this code, but give the original developers credit for writing it, and dont try to sue them if it blows up your computer.
So theres nothing in the licence that forces the code to stay open, unlike with the GPL, which requires that users of the code also make their modifications freely available. This crucial difference has sparked countless flame wars over the years, with BSD fans saying that their licence is more free (because its less restrictive), while GNU/GPL fans say that their licence is actually more free (because it preserves freedom down the road).
#### Blimey. Anyway, now that youve piqued my interest, where can I try out all these lovely BSD flavours? ####
You can probably guess the websites [www.openbsd.org][1], [www.freebsd.org][2] and [www.netbsd.org][3] where you can download ISO images, boot them in VirtualBox, and play around. If youve been using Linux for a while, you wont find any of them too difficult, although youre expected to know your way around the command line. If youre looking for something more newbie-friendly, PC-BSD
([www.pcbsd.org][4]) is a customised version of FreeBSD focused on the desktop, with a fancy graphical installer and super-simple management of software. Have fun exploring!
--------------------------------------------------------------------------------
via: http://www.linuxvoice.com/faq-bsd-2/
作者:[Mike Saunders][a]
译者:[译者ID](https://github.com/译者ID)
校对:[校对者ID](https://github.com/校对者ID)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出
[a]:http://www.linuxvoice.com/author/mike/
[1]:http://www.openbsd.org/
[2]:http://www.freebsd.org/
[3]:http://www.netbsd.org/
[4]:http://www.pcbsd.org/