Россия, Санкт-Петербург |
Introduction
FreeBSD and Linux
In 1991, Linux Torvalds, then a student in Helsinki, Finland, decided he wanted to run UNIX on his home computer. Atthat time the BSD sources were not freely available, and so Linus wrote his own version of UNIX, which he called Linux.
Linux is a superb example of how a few dedicated; clever people can produce an operating system that is better than well-known commercial systems developed by a large number of trained software engineers. It is better even than a number of commercial UNIX systems.
Obviously, I prefer FreeBSD over Linux, or I wouldn't be writing this course , but the differences between FreeBSD and Linux are more a matter of philosophy rather than of concept. Here are a few contrasts:
FreeBSD is a direct descendent of the original UNIX, though it contains no residual AT& T code | Linux is a clone and never contained any AT&T code |
---|---|
FreeBSD is a complete operating system, maintained by a central group of software developers under the Concurrent Versions System which maintains a complete history of the project development. There is only one distribution of FreeBSD | Linux is a kernel, personally maintained by Linus Torvalds and a few trusted companions. The non-kernel programs supplied with Linux are part of a distribution, of which there are several. Distributions are not completely compatible with each other. |
The FreeBSD development style emphasizes accountability and documentation of changes | The Linux kernel is maintained by a small number of people who keep track of all changes. Unofficial patches abound. |
The kernel supplied with a specific release of FreeBSD is clearly defined. | Linux distributions often have subtly different kernels. The differences are not always documented |
FreeBSD aims to be a stable production environment | Many versions of Linux are still "bleeding edge" development environments. This is changing rapidly, however |
As a result of the centralized development style, FreeBSD is straightforward and easy to install | The ease of installation of Linux depends on the distribution. If you switch from one distribution of Linux to another, you’ll have to learn a new set of installation tools. |
FreeBSD is still relatively unknown, since its distribution was initially restricted due to the AT&T lawsuits | Linux did not have any lawsuits to contend with, so for some time it was thought to be the only free UNIX-type system available |
As a result of the lack of knowledge of FreeBSD, relatively little commercial software is available for it | A growing amount of commercial software is becoming available for Linux. |
As a result of the smaller user base, FreeBSD is less likely to have drivers for brand-new boards than Linux | Just about any new board will soon have a driver for Linux |
Because of the lack of commercial applications and drivers for FreeBSD, Free-BSD runs most Linux programs, whether commercial or not | Linux appears not to need to be able to run FreeBSD programs |
FreeBSD is licensed under the BSD license—see page 6. There are very few restrictions on its use. | Linux is licensed under the GNU General Public License. Further details are athttp://www.gnu.org/licenses/gpl.html.comparison with the BSD license, it imposes significant restrictions on what you can do with the source code. |
FreeBSD Linux has aficionados who are prepared to pared to fame anybody who dares suggest fame anybody who dares suggest that it's that it's not better than Linux | In summary, Linux is also a very good operating system. For many, it's better than FreeBSD |
FreeBSD system documentation
FreeBSD comes with a considerable quantity of documentation which we'll look at in the following few pages:
- The FreeBSD Documentation Project maintains a collection of "books," documents in HTML or PDF format which can also be accessed online. They're installed in the directory hierarchy /usr/share/doc.
- The traditional UNIX document format is man pages, individual documents describing specific functionality. They’re short and to the point of being cryptic, but if you know what you're looking for, they have just the right amount of detail. They're not a good introduction.
- The GNU project introduced their own document format, GNU info. Some GNU programs have no other form of documentation.
Reading online documentation
You'll find a number of HTML documents in the directory /usr/share/doc/en/books:
- /usr/share/doc/en/books/faq/index.html contains the FreeBSD FAQ (Frequently Asked Questions). It's just what it says it is: a list of questions that people frequently ask about FreeBSD, with answers of course.
- /usr/share/doc/en/books/fdp-primer/index.html is a primer for the FreeBSD Documentation Project,
- /usr/share/doc/en/books/handbook/index.html is the FreeBSD online handbook. It contains a lot of information specifically about FreeBSD, including a deeper discussion of many topics in this course .
- /usr/share/doc/en/books/porters-handbook/index.html is a handbook for contributors to the FreeBSD Ports Collection, which we'll discuss in Chapter 9, The Ports Collection.
- /usr/share/doc/en/books/ppp-primer/index.html contains a somewhat dated document about setting up PPP. If you have trouble with Chapter 20, Configuring PPP, you may find it useful.
In addition to the directory /usr/share/doc/en/books, there's also a directory /usr/share/doc/en/articles with a number of shorter items of documentation.
Note the component en in the pathnames above. That stands for English.A number of these books are also installed in other languages: change en to de for a German version, to es for Spanish, to fr for French, to ja for Japanese, to ru for Russian, or to zh for Chinese. Translation efforts are continuing, so you may find documentation in other languages as well.
If you're running X, you can use a browser like mozilla to read the documents. If you don’t have Running yet, use lynx. Both of these programs are included in the CD-ROM distribution. To install them, use sysinstall, which is described on page 92.
lynx is not a complete substitute for complete web browsers such as mozilla:since it is text-only, it is not capable of displaying the large majority of web pages correctly. It's good enough for reading most of the FreeBSD online documentation, however.
In each case, you start the browser with the name of the document, for example:
$ lynx /usr/share/doc/en/books/handbook/index.html $ mozilla /usr/share/doc/en/books/handbook/index.html &
Enter the & after the invocation of mozilla to free up the window in which you invoke it: mozilla opens its own window.
If you haven’t installed the documentation, you can still access it from the Live File system CD-ROM. Assuming the CD-ROM is mounted on /cdrom, choose the file /cdrom/usr/share/doc/en/books/handbook/index.html.
Alternatively, you can print out the handbook. This is a little more difficult, and of course you'll lose the hypertext references, but you may prefer it in this form. To format the handbook for printing, you'll need a PostScript printer or ghostscript. See page 271 for more details of how to print PostScript.
The printable version of the documentation doesn't usually come with the CD-ROM distribution. You can pick it up with ftp (see page 433) from ftp://ftp.FreeBSD.ORG/pub/FreeBSD/doc/,which has the same directory structure as described above. For example, you would download the handbook in PostScript form from ftp://ftp.FreeBSD.ORG/pub/FreeBSD/doc/en/books/handbook/book.ps.bz2.