From owner-svn-doc-all@FreeBSD.ORG Tue Feb 4 18:53:38 2014 Return-Path: Delivered-To: svn-doc-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 64DECEA3; Tue, 4 Feb 2014 18:53:38 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 4E7B11CD8; Tue, 4 Feb 2014 18:53:38 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s14IrcqX004774; Tue, 4 Feb 2014 18:53:38 GMT (envelope-from dru@svn.freebsd.org) Received: (from dru@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s14IrceL004772; Tue, 4 Feb 2014 18:53:38 GMT (envelope-from dru@svn.freebsd.org) Message-Id: <201402041853.s14IrceL004772@svn.freebsd.org> From: Dru Lavigne Date: Tue, 4 Feb 2014 18:53:38 +0000 (UTC) To: doc-committers@freebsd.org, svn-doc-all@freebsd.org, svn-doc-head@freebsd.org Subject: svn commit: r43767 - head/en_US.ISO8859-1/articles/linux-users X-SVN-Group: doc-head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-doc-all@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: "SVN commit messages for the entire doc trees \(except for " user" , " projects" , and " translations" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 04 Feb 2014 18:53:38 -0000 Author: dru Date: Tue Feb 4 18:53:37 2014 New Revision: 43767 URL: http://svnweb.freebsd.org/changeset/doc/43767 Log: White space fix only. Translators can ignore. Sponsored by: iXsystems Modified: head/en_US.ISO8859-1/articles/linux-users/article.xml Modified: head/en_US.ISO8859-1/articles/linux-users/article.xml ============================================================================== --- head/en_US.ISO8859-1/articles/linux-users/article.xml Tue Feb 4 18:20:56 2014 (r43766) +++ head/en_US.ISO8859-1/articles/linux-users/article.xml Tue Feb 4 18:53:37 2014 (r43767) @@ -2,8 +2,8 @@
- FreeBSD Quickstart Guide for &linux; Users - + + FreeBSD Quickstart Guide for &linux; Users JohnFerrell @@ -28,120 +28,141 @@ - This document is intended to quickly familiarize intermediate to - advanced &linux; users with the basics of &os;. + This document is intended to quickly familiarize + intermediate to advanced &linux; users with the basics of + &os;. Introduction - This document highlights some of the technical differences between &os; and - &linux; so that intermediate to advanced &linux; users can quickly - familiarize themselves with the basics of &os;. - - This document assumes that &os; is already installed. - Refer to the - - Installing &os; chapter of the &os; Handbook for help with the installation - process. + This document highlights some of the technical differences + between &os; and &linux; so that intermediate to advanced + &linux; users can quickly familiarize themselves with the basics + of &os;. + + This document assumes that &os; is already installed. Refer + to the + Installing &os; chapter of the &os; Handbook for + help with the installation process. Default Shell &linux; users are often surprised to find that - Bash is not the default shell in &os;. - In fact, Bash is not even in the default - installation. Instead, &os; uses &man.tcsh.1; as the default shell. - However, Bash and other - shells are available for installation using the &os; Packages and Ports Collection. + Bash is not the default shell in + &os;. In fact, Bash is not even in + the default installation. Instead, &os; uses &man.tcsh.1; as + the default shell. However, Bash and + other shells are available for installation using the &os; Packages + and Ports Collection. After installing another shell, use &man.chsh.1; to change a user's default shell. It is recommended that the - root user's default shell remain unchanged since - shells which are not included in the base distribution - are installed to /usr/local/bin. - In the event of a problem, the file - system where /usr/local/bin is - located may not be mounted. In this - case, root would not have access to its default - shell, preventing root from logging in and fixing the problem. + root user's default + shell remain unchanged since shells which are not included in + the base distribution are installed to + /usr/local/bin. In the event of a problem, + the file system where /usr/local/bin is + located may not be mounted. In this case, root would not have access to + its default shell, preventing root from logging in and fixing + the problem. Packages and Ports: Adding Software in &os; - &os; provides - two methods for installing applications: binary packages and compiled ports. - Each method has its own benefits: - - - Binary Packages - - Faster installation as compared to compiling large applications. - - Does not require an understanding of how to compile - software. - - No need to install a compiler. - - - - Ports - - Ability to customize installation options. - - Custom patches can be applied. - - - If an application installation does not require any customization, installing the package - is sufficient. Compile the port instead whenever an application requires - customization of the default options. If needed, - a custom - package can be compiled from ports using make - package. - - A complete list of of all available ports and packages - can be found here. + &os; provides two methods for installing applications: + binary packages and compiled ports. Each method has its own + benefits: + + + Binary Packages + + + Faster installation as compared to + compiling large applications. + + + + Does not require an understanding of how to + compile software. + + + + No need to install a compiler. + + + + + Ports + + + Ability to customize installation options. + + + + Custom patches can be applied. + + + + If an application installation does not require any + customization, installing the package is sufficient. Compile + the port instead whenever an application requires customization + of the default options. If needed, a custom package can be + compiled from ports using make + package. + + A complete list of of all available ports and packages can + be found here. Packages - Packages are pre-compiled applications, the &os; equivalents - of .deb files on Debian/Ubuntu based systems - and .rpm files on Red Hat/Fedora based - systems. Packages are installed using pkg. For example, + Packages are pre-compiled applications, the &os; + equivalents of .deb files on + Debian/Ubuntu based systems and .rpm + files on Red Hat/Fedora based systems. Packages are + installed using pkg. For example, the following command installs Apache 2.4: &prompt.root; pkg install apache24 For more information on packages refer to section 5.4 of - the &os; Handbook: Using pkgng for Binary Package Management. + the &os; Handbook: Using + pkgng for Binary Package Management. Ports The &os; Ports Collection is a framework of - Makefiles and patches specifically customized - for installing applications from source on &os;. - When installing a port, the system will fetch the source code, apply - any required patches, compile the code, and install the application - and any required dependencies. - - The Ports Collection, sometimes referred to as the ports tree, - can be installed to /usr/ports using &man.portsnap.8;. - Detailed instructions for installing the Ports Collection can be - found in section 5.5 - of the &os; Handbook. - - To compile a port, change to the - port's directory and start the build process. The following example - installs Apache 2.4 from the - Ports Collection: + Makefiles and patches specifically + customized for installing applications from source on &os;. + When installing a port, the system will fetch the source code, + apply any required patches, compile the code, and install the + application and any required dependencies. + + The Ports Collection, sometimes referred to as the ports + tree, can be installed to /usr/ports + using &man.portsnap.8;. Detailed instructions for installing + the Ports Collection can be found in section + 5.5 of the &os; Handbook. + + To compile a port, change to the port's directory and + start the build process. The following example installs + Apache 2.4 from the Ports + Collection: &prompt.root; cd /usr/ports/www/apache24 &prompt.root; make install clean @@ -154,63 +175,66 @@ &prompt.root; cd /usr/ports/www/apache24 &prompt.root; make WITH_LDAP="YES" install clean - Refer to Using - the Ports Collection for more information. + Refer to Using + the Ports Collection for more information. System Startup - Many &linux; distributions use the SysV init system, whereas &os; uses the - traditional BSD-style &man.init.8;. Under the BSD-style &man.init.8;, - there are no run-levels and /etc/inittab does not exist. - Instead, startup is controlled by &man.rc.8; scripts. At system boot, + Many &linux; distributions use the SysV init system, whereas + &os; uses the traditional BSD-style &man.init.8;. Under the + BSD-style &man.init.8;, there are no run-levels and + /etc/inittab does not exist. Instead, + startup is controlled by &man.rc.8; scripts. At system boot, /etc/rc reads /etc/rc.conf and /etc/defaults/rc.conf - to determine which services are to be - started. The specified services are then started by running the - corresponding service initialization scripts located in + to determine which services are to be started. The specified + services are then started by running the corresponding service + initialization scripts located in /etc/rc.d/ and - /usr/local/etc/rc.d/. These scripts are similar to - the scripts located in /etc/init.d/ on &linux; - systems. - - The scripts found in - /etc/rc.d/ are for applications that are part of - the base system, such as &man.cron.8;, &man.sshd.8;, and - &man.syslog.3;. The scripts in - /usr/local/etc/rc.d/ are for user-installed - applications such as Apache and - Squid. - - Since &os; is - developed as a complete operating system, - user-installed applications are not considered to be part of - the base system. - User-installed applications are generally installed using Packages or Ports. - In order to keep them separate from the base system, - user-installed applications are installed under - /usr/local/. Therefore, user-installed - binaries reside in /usr/local/bin/, - configuration files are in /usr/local/etc/, - and so on. + /usr/local/etc/rc.d/. These scripts are + similar to the scripts located in + /etc/init.d/ on &linux; systems. + + The scripts found in /etc/rc.d/ are for + applications that are part of the base system, + such as &man.cron.8;, &man.sshd.8;, and &man.syslog.3;. The + scripts in /usr/local/etc/rc.d/ are for + user-installed applications such as + Apache and + Squid. + + Since &os; is developed as a complete operating system, + user-installed applications are not considered to be part of + the base system. User-installed applications + are generally installed using Packages + or Ports. In order to keep them separate from the base + system, user-installed applications are installed under + /usr/local/. Therefore, user-installed + binaries reside in /usr/local/bin/, + configuration files are in /usr/local/etc/, + and so on. Services are enabled by adding an entry for the service in - /etc/rc.conf . The system defaults are found in - /etc/defaults/rc.conf and - these default settings are overridden by settings in + /etc/rc.conf . The system defaults are + found in /etc/defaults/rc.conf and these + default settings are overridden by settings in /etc/rc.conf. Refer to &man.rc.conf.5; for - more information about the available entries. When installing additional - applications, review the application's install message to determine how to - enable any associated services. - - The following entries in /etc/rc.conf enable - &man.sshd.8;, enable Apache 2.4, and - specify that Apache should be started - with SSL. + more information about the available entries. When installing + additional applications, review the application's install + message to determine how to enable any associated + services. + + The following entries in /etc/rc.conf + enable &man.sshd.8;, enable Apache + 2.4, and specify that + Apache should be started with + SSL. # enable SSHD sshd_enable="YES" @@ -218,15 +242,15 @@ sshd_enable="YES" apache24_enable="YES" apache24_flags="-DSSL" - Once a service has been enabled in /etc/rc.conf, - it can be started without rebooting the - system: + Once a service has been enabled in + /etc/rc.conf, it can be started without + rebooting the system: &prompt.root; service sshd start &prompt.root; service apache24 start - If a service has not been enabled, it can be started from the - command line using : + If a service has not been enabled, it can be started from + the command line using : &prompt.root; service sshd onestart @@ -234,13 +258,14 @@ apache24_flags="-DSSL" Network configuration - Instead of a generic ethX identifier that - &linux; uses to identify a network interface, &os; uses the driver - name followed by a number. The following output - from &man.ifconfig.8; shows two &intel; Pro 1000 network - interfaces (em0 and em1): + Instead of a generic ethX identifier + that &linux; uses to identify a network interface, &os; uses the + driver name followed by a number. The following output from + &man.ifconfig.8; shows two &intel; Pro 1000 network + interfaces (em0 and + em1): - &prompt.user; ifconfig + &prompt.user; ifconfig em0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> mtu 1500 options=b<RXCSUM,TXCSUM,VLAN_MTU> inet 10.10.10.100 netmask 0xffffff00 broadcast 10.10.10.255 @@ -254,61 +279,73 @@ em1: flags=8843<UP,BROADCAST,RUNNING, media: Ethernet autoselect (1000baseTX <full-duplex>) status: active - An IP address can be assigned to an interface using - &man.ifconfig.8;. To remain persistent across reboots, the - IP configuration must be included in - /etc/rc.conf. The following /etc/rc.conf entries - specify the hostname, IP address, and default gateway: + An IP address can be assigned to an + interface using &man.ifconfig.8;. To remain persistent across + reboots, the IP configuration must be + included in /etc/rc.conf. The following + /etc/rc.conf entries specify the hostname, + IP address, and default gateway: - hostname="server1.example.com" + hostname="server1.example.com" ifconfig_em0="inet 10.10.10.100 netmask 255.255.255.0" defaultrouter="10.10.10.1" - Use the following entries to instead configure an interface for DHCP: + Use the following entries to instead configure an interface + for DHCP: - hostname="server1.example.com" + hostname="server1.example.com" ifconfig_em0="DHCP" Firewall - &os; does not use &linux; IPTABLES for its firewall. Instead, &os; offers - a choice of three kernel level firewalls: + &os; does not use &linux; + IPTABLES for its firewall. Instead, + &os; offers a choice of three kernel level firewalls: - PF - IPFILTER - IPFW + + PF + + + IPFILTER + + + IPFW + - PF is - developed by the OpenBSD project and ported to &os;. PF was - created as a replacement for IPFILTER and - its syntax is similar to that of - IPFILTER. PF can - be paired with &man.altq.4; to provide QoS features. - - This sample PF entry allows inbound - SSH: - - pass in on $ext_if inet proto tcp from any to ($ext_if) port 22 - - IPFILTER is the firewall application - developed by Darren Reed. It is not specific to &os; and has been - ported to several operating systems including NetBSD, OpenBSD, SunOS, - HP/UX, and Solaris. + PF is developed by the OpenBSD + project and ported to &os;. PF was + created as a replacement for IPFILTER + and its syntax is similar to that of + IPFILTER. + PF can be paired with &man.altq.4; to + provide QoS features. + + This sample PF entry allows + inbound SSH: + + pass in on $ext_if inet proto tcp from any to ($ext_if) port 22 + + IPFILTER is the firewall + application developed by Darren Reed. It is not specific to + &os; and has been ported to several operating systems including + NetBSD, OpenBSD, SunOS, HP/UX, and Solaris. - The IPFILTER syntax to allow inbound - SSH is: + The IPFILTER syntax to allow + inbound SSH is: pass in on $ext_if proto tcp from any to any port = 22 - - IPFW is the - firewall developed and maintained by &os;. - It can be paired with &man.dummynet.4; to - provide traffic shaping capabilities and simulate different types of - network connections. + + IPFW is the firewall developed + and maintained by &os;. It can be paired with &man.dummynet.4; + to provide traffic shaping capabilities and simulate different + types of network connections. The IPFW syntax to allow inbound SSH would be: @@ -319,45 +356,49 @@ ifconfig_em0="DHCP" Updating &os; - There are two methods for updating a &os; system: from source or - binary updates. + There are two methods for updating a &os; system: from + source or binary updates. - Updating from source is the most involved update method, but offers - the greatest amount of flexibility. The process involves synchronizing a - local copy of the &os; source code with the &os; - Subversion servers. - Once the local source code is up-to-date, a new version of - the kernel and userland can be compiled. - - Binary updates are similar to using yum or - apt-get to update a &linux; system. In &os;, - &man.freebsd-update.8; can be used fetch new binary updates and install them. These - updates can be scheduled using &man.cron.8;. + Updating from source is the most involved update method, but + offers the greatest amount of flexibility. The process involves + synchronizing a local copy of the &os; source code with the &os; + Subversion servers. Once the local + source code is up-to-date, a new version of the kernel and + userland can be compiled. + + Binary updates are similar to using yum + or apt-get to update a &linux; system. In + &os;, &man.freebsd-update.8; can be used fetch new binary + updates and install them. These updates can be scheduled using + &man.cron.8;. - When using &man.cron.8; to schedule updates, - use freebsd-update cron in the &man.crontab.1; - to reduce the possibility of a large number of machines all pulling - updates at the same time: + When using &man.cron.8; to schedule updates, use + freebsd-update cron in the &man.crontab.1; + to reduce the possibility of a large number of machines all + pulling updates at the same time: 0 3 * * * root /usr/sbin/freebsd-update cron For more information on source and binary updates, refer to - the chapter on updating - in the &os; Handbook. + the + chapter on updating in the &os; Handbook. procfs: Gone But Not Forgotten In some &linux; distributions, one could look at - /proc/sys/net/ipv4/ip_forward to determine if - IP forwarding is enabled. In &os; &man.sysctl.8; is instead used to - view this and other system settings. + /proc/sys/net/ipv4/ip_forward to determine + if IP forwarding is enabled. In &os; + &man.sysctl.8; is instead used to view this and other system + settings. - For example, use the following to - determine if IP forwarding is enabled on a &os; system: + For example, use the following to determine if + IP forwarding is enabled on a &os; + system: &prompt.user; sysctl net.inet.ip.forwarding net.inet.ip.forwarding: 0 @@ -367,15 +408,14 @@ net.inet.ip.forwarding: 0 &prompt.user; sysctl -a | more - If an application requires procfs, - add the following entry to - /etc/fstab: + If an application requires procfs, add the following entry + to /etc/fstab: proc /proc procfs rw,noauto 0 0 - Including will prevent - /proc from being automatically mounted at - boot. + Including will prevent + /proc from being automatically mounted at + boot. To mount the file system without rebooting: @@ -387,71 +427,75 @@ net.inet.ip.forwarding: 0 Some common command equivalents are as follows: - - - - - - &linux; command (Red Hat/Debian) - &os; equivalent - Purpose - - - - - - yum install package / apt-get install package - pkg install package - Install package from remote repository - - - - rpm -ivh package / dpkg -i package - pkg add package - Install local package - - - - rpm -qa / dpkg -l - pkg info - List installed packages - - - - lspci - pciconf - List PCI devices - - - - lsmod - kldstat - List loaded kernel modules - - - - modprobe - kldload / kldunload - Load/Unload kernel modules - - - - strace - truss - Trace system calls - - - - - + + + + + + &linux; command (Red Hat/Debian) + &os; equivalent + Purpose + + + + + + yum install package / + apt-get install package + pkg install package + Install package from remote repository + + + + rpm -ivh package + / dpkg -i package + pkg add package + Install local package + + + + rpm -qa + / dpkg -l + pkg info + List installed packages + + + + lspci + pciconf + List PCI devices + + + + lsmod + kldstat + List loaded kernel modules + + + + modprobe + kldload + / kldunload + Load/Unload kernel modules + + + + strace + truss + Trace system calls + + + + Conclusion - This document has provided an overview of - &os;. Refer to the &os; Handbook - for more in-depth coverage of these topics as well as - the many topics not covered by this document. + This document has provided an overview of &os;. Refer to + the &os; Handbook + for more in-depth coverage of these topics as well as the many + topics not covered by this document.