Freebsd Handbook
Total Page:16
File Type:pdf, Size:1020Kb
FreeBSD Handbook http://www.freebsd.org/doc/en_US.ISO8859-1/books/han... FreeBSD Handbook The FreeBSD Documentation Project Copyright © 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013 The FreeBSD Documentation Project Welcome to FreeBSD! This handbook covers the installation and day to day use of FreeBSD 8.3-RELEASE and FreeBSD 9.1-RELEASE. This manual is a work in progress and is the work of many individuals. As such, some sections may become dated and require updating. If you are interested in helping out with this project, send email to the FreeBSD documentation project mailing list. The latest version of this document is always available from the FreeBSD web site (previous versions of this handbook can be obtained from http://docs.FreeBSD.org/doc/). It may also be downloaded in a variety of formats and compression options from the FreeBSD FTP server or one of the numerous mirror sites. If you would prefer to have a hard copy of the handbook, you can purchase one at the FreeBSD Mall. You may also want to search the handbook. REDISTRIBUTION AND USE IN SOURCE (XML DOCBOOK) AND 'COMPILED' FORMS (XML, HTML, PDF, POSTSCRIPT, RTF AND SO FORTH) WITH OR WITHOUT MODIFICATION, ARE PERMITTED PROVIDED THAT THE FOLLOWING CONDITIONS ARE MET: 1. REDISTRIBUTIONS OF SOURCE CODE (XML DOCBOOK) MUST RETAIN THE ABOVE COPYRIGHT NOTICE, THIS LIST OF CONDITIONS AND THE FOLLOWING DISCLAIMER AS THE FIRST LINES OF THIS FILE UNMODIFIED. 2. REDISTRIBUTIONS IN COMPILED FORM (TRANSFORMED TO OTHER DTDS, CONVERTED TO PDF, POSTSCRIPT, RTF AND OTHER FORMATS) MUST REPRODUCE THE ABOVE COPYRIGHT NOTICE, THIS LIST OF CONDITIONS AND THE FOLLOWING DISCLAIMER IN THE DOCUMENTATION AND/OR OTHER MATERIALS PROVIDED WITH THE DISTRIBUTION. IMPORTANT: THIS DOCUMENTATION IS PROVIDED BY THE FREEBSD DOCUMENTATION PROJECT "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FREEBSD DOCUMENTATION PROJECT BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS DOCUMENTATION, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. FREEBSD IS A REGISTERED TRADEMARK OF THE FREEBSD FOUNDATION. 1 de 1839 27/01/13 22:01 FreeBSD Handbook http://www.freebsd.org/doc/en_US.ISO8859-1/books/han... 3COM AND HOMECONNECT ARE REGISTERED TRADEMARKS OF 3COM CORPORATION. 3WARE AND ESCALADE ARE REGISTERED TRADEMARKS OF 3WARE INC. ARM IS A REGISTERED TRADEMARK OF ARM LIMITED. ADAPTEC IS A REGISTERED TRADEMARK OF ADAPTEC, INC. ADOBE, ACROBAT, ACROBAT READER, AND POSTSCRIPT ARE EITHER REGISTERED TRADEMARKS OR TRADEMARKS OF ADOBE SYSTEMS INCORPORATED IN THE UNITED STATES AND/OR OTHER COUNTRIES. APPLE, AIRPORT, FIREWIRE, MAC, MACINTOSH, MAC OS, QUICKTIME, AND TRUETYPE ARE TRADEMARKS OF APPLE COMPUTER, INC., REGISTERED IN THE UNITED STATES AND OTHER COUNTRIES. COREL AND WORDPERFECT ARE TRADEMARKS OR REGISTERED TRADEMARKS OF COREL CORPORATION AND/OR ITS SUBSIDIARIES IN CANADA, THE UNITED STATES AND/OR OTHER COUNTRIES. SOUND BLASTER IS A TRADEMARK OF CREATIVE TECHNOLOGY LTD. IN THE UNITED STATES AND/OR OTHER COUNTRIES. CVSUP IS A REGISTERED TRADEMARK OF JOHN D. POLSTRA. HEIDELBERG, HELVETICA, PALATINO, AND TIMES ROMAN ARE EITHER REGISTERED TRADEMARKS OR TRADEMARKS OF HEIDELBERGER DRUCKMASCHINEN AG IN THE U.S. AND OTHER COUNTRIES. IBM, AIX, ETHERJET, NETFINITY, OS/2, POWERPC, PS/2, S/390, AND THINKPAD ARE TRADEMARKS OF INTERNATIONAL BUSINESS MACHINES CORPORATION IN THE UNITED STATES, OTHER COUNTRIES, OR BOTH. IEEE, POSIX, AND 802 ARE REGISTERED TRADEMARKS OF INSTITUTE OF ELECTRICAL AND ELECTRONICS ENGINEERS, INC. IN THE UNITED STATES. INTEL, CELERON, ETHEREXPRESS, I386, I486, ITANIUM, PENTIUM, AND XEON ARE TRADEMARKS OR REGISTERED TRADEMARKS OF INTEL CORPORATION OR ITS SUBSIDIARIES IN THE UNITED STATES AND OTHER COUNTRIES. INTUIT AND QUICKEN ARE REGISTERED TRADEMARKS AND/OR REGISTERED SERVICE MARKS OF INTUIT INC., OR ONE OF ITS SUBSIDIARIES, IN THE UNITED STATES AND OTHER COUNTRIES. LINUX IS A REGISTERED TRADEMARK OF LINUS TORVALDS. LSI LOGIC, ACCELERAID, EXTREMERAID, MEGARAID AND MYLEX ARE TRADEMARKS OR REGISTERED TRADEMARKS OF LSI LOGIC CORP. M-SYSTEMS AND DISKONCHIP ARE TRADEMARKS OR REGISTERED TRADEMARKS OF M-SYSTEMS FLASH DISK PIONEERS, LTD. MACROMEDIA, FLASH, AND SHOCKWAVE ARE TRADEMARKS OR REGISTERED TRADEMARKS OF MACROMEDIA, INC. IN THE UNITED STATES AND/OR OTHER COUNTRIES. MICROSOFT, INTELLIMOUSE, MS-DOS, OUTLOOK, WINDOWS, WINDOWS MEDIA AND WINDOWS NT ARE EITHER REGISTERED TRADEMARKS OR TRADEMARKS OF MICROSOFT CORPORATION IN THE UNITED STATES AND/OR OTHER COUNTRIES. NETSCAPE AND THE NETSCAPE NAVIGATOR ARE REGISTERED TRADEMARKS OF NETSCAPE COMMUNICATIONS CORPORATION IN THE U.S. AND OTHER COUNTRIES. GATED AND NEXTHOP ARE REGISTERED AND UNREGISTERED TRADEMARKS OF NEXTHOP IN THE U.S. AND OTHER COUNTRIES. MOTIF, OSF/1, AND UNIX ARE REGISTERED TRADEMARKS AND IT DIALTONE AND THE OPEN 2 de 1839 27/01/13 22:01 FreeBSD Handbook http://www.freebsd.org/doc/en_US.ISO8859-1/books/han... GROUP ARE TRADEMARKS OF THE OPEN GROUP IN THE UNITED STATES AND OTHER COUNTRIES. ORACLE IS A REGISTERED TRADEMARK OF ORACLE CORPORATION. POWERQUEST AND PARTITIONMAGIC ARE REGISTERED TRADEMARKS OF POWERQUEST CORPORATION IN THE UNITED STATES AND/OR OTHER COUNTRIES. REALNETWORKS, REALPLAYER, AND REALAUDIO ARE THE REGISTERED TRADEMARKS OF REALNETWORKS, INC. RED HAT, RPM, ARE TRADEMARKS OR REGISTERED TRADEMARKS OF RED HAT, INC. IN THE UNITED STATES AND OTHER COUNTRIES. SAP, R/3, AND MYSAP ARE TRADEMARKS OR REGISTERED TRADEMARKS OF SAP AG IN GERMANY AND IN SEVERAL OTHER COUNTRIES ALL OVER THE WORLD. SUN, SUN MICROSYSTEMS, JAVA, JAVA VIRTUAL MACHINE, JAVASERVER PAGES, JDK, JRE, JSP, JVM, NETRA, OPENJDK, SOLARIS, STAROFFICE, SUN BLADE, SUN ENTERPRISE, SUN FIRE, SUNOS, ULTRA AND VIRTUALBOX ARE TRADEMARKS OR REGISTERED TRADEMARKS OF SUN MICROSYSTEMS, INC. IN THE UNITED STATES AND OTHER COUNTRIES. SYMANTEC AND GHOST ARE REGISTERED TRADEMARKS OF SYMANTEC CORPORATION IN THE UNITED STATES AND OTHER COUNTRIES. MATLAB IS A REGISTERED TRADEMARK OF THE MATHWORKS, INC. SPEEDTOUCH IS A TRADEMARK OF THOMSON. U.S. ROBOTICS AND SPORTSTER ARE REGISTERED TRADEMARKS OF U.S. ROBOTICS CORPORATION. VMWARE IS A TRADEMARK OF VMWARE, INC. WATERLOO MAPLE AND MAPLE ARE TRADEMARKS OR REGISTERED TRADEMARKS OF WATERLOO MAPLE INC. MATHEMATICA IS A REGISTERED TRADEMARK OF WOLFRAM RESEARCH, INC. XFREE86 IS A TRADEMARK OF THE XFREE86 PROJECT, INC. OGG VORBIS AND XIPH.ORG ARE TRADEMARKS OF XIPH.ORG. MANY OF THE DESIGNATIONS USED BY MANUFACTURERS AND SELLERS TO DISTINGUISH THEIR PRODUCTS ARE CLAIMED AS TRADEMARKS. WHERE THOSE DESIGNATIONS APPEAR IN THIS DOCUMENT, AND THE FREEBSD PROJECT WAS AWARE OF THE TRADEMARK CLAIM, THE DESIGNATIONS HAVE BEEN FOLLOWED BY THE “™” OR THE “®” SYMBOL. [ Split HTML / Single HTML ] Table of Contents Preface I. Getting Started 1 Introduction 1.1 Synopsis 1.2 Welcome to FreeBSD! 1.3 About the FreeBSD Project 2 Installing FreeBSD 9.X and Later 3 de 1839 27/01/13 22:01 FreeBSD Handbook http://www.freebsd.org/doc/en_US.ISO8859-1/books/han... 2.1 Synopsis 2.2 Hardware Requirements 2.3 Pre-Installation Tasks 2.4 Starting the Installation 2.5 Introducing bsdinstall 2.6 Installing from the Network 2.7 Allocating Disk Space 2.8 Committing to the Installation 2.9 Post-Installation 2.10 Troubleshooting 2.11 Using the Live CD 3 Installing FreeBSD 8.X and Earlier 3.1 Synopsis 3.2 Hardware Requirements 3.3 Pre-installation Tasks 3.4 Starting the Installation 3.5 Introducing Sysinstall 3.6 Allocating Disk Space 3.7 Choosing What to Install 3.8 Choosing Your Installation Media 3.9 Committing to the Installation 3.10 Post-installation 3.11 Troubleshooting 3.12 Advanced Installation Guide 3.13 Preparing Your Own Installation Media 4 UNIX Basics 4.1 Synopsis 4.2 Virtual Consoles and Terminals 4.3 Permissions 4.4 Directory Structure 4.5 Disk Organization 4.6 Mounting and Unmounting File Systems 4.7 Processes 4.8 Daemons, Signals, and Killing Processes 4.9 Shells 4.10 Text Editors 4.11 Devices and Device Nodes 4.12 Binary Formats 4.13 For More Information 5 Installing Applications: Packages and Ports 5.1 Synopsis 5.2 Overview of Software Installation 5.3 Finding Your Application 5.4 Using the Packages System 5.5 Using pkgng for Binary Package Management 5.6 Using the Ports Collection 4 de 1839 27/01/13 22:01 FreeBSD Handbook http://www.freebsd.org/doc/en_US.ISO8859-1/books/han... 5.7 Post-installation Activities 5.8 Dealing with Broken Ports 6 The X Window System 6.1 Synopsis 6.2 Understanding X 6.3 Installing X11 6.4 X11 Configuration 6.5 Using Fonts in X11 6.6 The X Display Manager 6.7 Desktop Environments II. Common Tasks 7 Desktop Applications 7.1 Synopsis 7.2 Browsers 7.3 Productivity 7.4 Document Viewers 7.5 Finance 7.6 Summary 8 Multimedia 8.1 Synopsis 8.2 Setting Up the Sound Card 8.3 MP3 Audio 8.4 Video Playback 8.5 Setting Up TV Cards 8.6 MythTV 8.7 Image Scanners 9 Configuring the FreeBSD Kernel 9.1 Synopsis 9.2 Why Build a Custom Kernel? 9.3 Finding the System Hardware 9.4 Kernel Drivers, Subsystems, and Modules 9.5 Building and Installing a Custom Kernel 9.6 The Configuration File 9.7 If Something Goes Wrong 10 Printing 10.1 Synopsis 10.2 Introduction 10.3 Basic Setup 10.4 Advanced Printer Setup 10.5 Using Printers 10.6 Alternatives to the Standard Spooler 10.7 Troubleshooting 5 de 1839 27/01/13 22:01 FreeBSD Handbook http://www.freebsd.org/doc/en_US.ISO8859-1/books/han..