From owner-svn-doc-projects@FreeBSD.ORG Wed May 8 21:39:52 2013 Return-Path: Delivered-To: svn-doc-projects@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id 818E2B70; Wed, 8 May 2013 21:39:52 +0000 (UTC) (envelope-from dru@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 73339ECA; Wed, 8 May 2013 21:39:52 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.6/8.14.6) with ESMTP id r48Ldq8t095497; Wed, 8 May 2013 21:39:52 GMT (envelope-from dru@svn.freebsd.org) Received: (from dru@localhost) by svn.freebsd.org (8.14.6/8.14.5/Submit) id r48LdqAJ095496; Wed, 8 May 2013 21:39:52 GMT (envelope-from dru@svn.freebsd.org) Message-Id: <201305082139.r48LdqAJ095496@svn.freebsd.org> From: Dru Lavigne Date: Wed, 8 May 2013 21:39:52 +0000 (UTC) To: doc-committers@freebsd.org, svn-doc-projects@freebsd.org Subject: svn commit: r41571 - projects/ISBN_1-57176-407-0/en_US.ISO8859-1/books/handbook/basics X-SVN-Group: doc-projects MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-doc-projects@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for doc projects trees List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 08 May 2013 21:39:52 -0000 Author: dru Date: Wed May 8 21:39:52 2013 New Revision: 41571 URL: http://svnweb.freebsd.org/changeset/doc/41571 Log: This patch addresses the following: - you - replace command/app tags with entities - fix xref tags - fix some acronyms Approved by: gjb (mentor) Modified: projects/ISBN_1-57176-407-0/en_US.ISO8859-1/books/handbook/basics/chapter.xml Modified: projects/ISBN_1-57176-407-0/en_US.ISO8859-1/books/handbook/basics/chapter.xml ============================================================================== --- projects/ISBN_1-57176-407-0/en_US.ISO8859-1/books/handbook/basics/chapter.xml Wed May 8 17:55:10 2013 (r41570) +++ projects/ISBN_1-57176-407-0/en_US.ISO8859-1/books/handbook/basics/chapter.xml Wed May 8 21:39:52 2013 (r41571) @@ -57,7 +57,7 @@ - What a shell is, and how to change your default login + What a shell is, and how to change the default login environment. @@ -87,10 +87,10 @@ &os; can be used in various ways. One of them is typing commands to a text terminal. A lot of the flexibility and power - of a &unix; operating system is readily available at your hands + of a &unix; operating system is readily available when using &os; this way. This section describes what terminals and consoles are, and - how you can use them in &os;. + how to use them in &os;. The Console @@ -144,8 +144,9 @@ login: login: - Type the username that was configured during system installation and + Type the username that was configured during system + installation, as described in , and press Enter. Then enter the password associated with the username and press Enter. The password is not echoed for security @@ -165,8 +166,8 @@ login: &os; can be configured to provide many virtual consoles for inputting commands. Each virtual console has its own login prompt and output channel, and &os; takes care of - properly redirecting keyboard input and monitor output as you - switch between virtual consoles. + properly redirecting keyboard input and monitor output as + switching occurs between virtual consoles. Special key combinations have been reserved by &os; for switching consoles. @@ -228,7 +229,7 @@ ttyv8 "/usr/X11R6/bin/xdm -nodaemon" Single User Mode Console A detailed description of single user mode - can be found here. + can be found in . There is only one console when &os; is in single user mode as no other virtual consoles are available in this mode. The settings for single user mode are found in this section of @@ -249,8 +250,9 @@ console none without prompting for a password. Be careful when changing this setting to - insecure. If you ever - forget the root password, booting into + insecure. If + the root password is forgotten, booting + into single user mode is still possible, but may be difficult for someone who is not comfortable with the &os; booting process. @@ -375,7 +377,7 @@ console none - ls + &man.ls.1; directories @@ -418,7 +420,7 @@ total 530 directory has a slightly different meaning than that of files. When a directory is marked executable, it means it is possible to change into that directory using - cd. This also means that it is + &man.cd.1;. This also means that it is possible to access the files within that directory, subject to the permissions on the files themselves. @@ -662,7 +664,7 @@ total 530 Note that a s is now part of the permission set designated for the file owner, replacing the executable bit. This allows utilities which need elevated - permissions, such as passwd. + permissions, such as &man.passwd.1;. The nosuid &man.mount.8; option will @@ -673,10 +675,10 @@ total 530 To view this in real time, open two terminals. On - one, start the passwd process as a normal + one, type passwd as a normal user. While it waits for a new password, check the process table and look at the user information for - passwd: + &man.passwd.1;: In terminal A: @@ -690,8 +692,8 @@ Old Password: trhodes 5232 0.0 0.2 3420 1608 0 R+ 2:10AM 0:00.00 grep passwd root 5211 0.0 0.2 3620 1724 2 I+ 2:09AM 0:00.01 passwd - As stated above, the passwd is run - by a normal user, but is using the effective + Although &man.passwd.1; is run + as a normal user, it is using the effective UID of root. The setgid permission performs the @@ -702,7 +704,7 @@ root 5211 0.0 0.2 3620 1724 2 user who started the process. To set the setgid permission on a - file, provide chmod with a leading two + file, provide &man.chmod.1; with a leading two (2): &prompt.root; chmod 2755 sgidexample.sh @@ -848,8 +850,7 @@ root 5211 0.0 0.2 3620 1724 2 /etc/namedb/ - named configuration files. - Refer to &man.named.8; for details. + &man.named.8; configuration files. @@ -863,8 +864,7 @@ root 5211 0.0 0.2 3620 1724 2 /etc/ppp/ - ppp configuration files as - described in &man.ppp.8;. + &man.ppp.8; configuration files. @@ -1071,7 +1071,7 @@ root 5211 0.0 0.2 3620 1724 2 Files are stored in directories. A directory may contain no files, or it may contain many hundreds of files. A directory - can also contain other directories, allowing you to build up a + can also contain other directories, allowing a hierarchy of directories within one another in order to organize data. @@ -1087,7 +1087,7 @@ root 5211 0.0 0.2 3620 1724 2 different from &windows; which uses \ to separate file and directory names. &os; does not use drive letters, or other drive names in - the path. For example, you would not type + the path. For example, one would not type c:/foo/bar/readme.txt on &os;. Directories and files are stored in a file system. Each @@ -1097,11 +1097,11 @@ root 5211 0.0 0.2 3620 1724 2 directories. One file system is designated the root file system or /. Every other file system is mounted under - the root file system. No matter how many disks you have on your + the root file system. No matter how many disks are on the &os; system, every directory appears to be part of the same disk. - Suppose you have three file systems, called + Consider three file systems, called A, B, and C. Each file system has one root directory, which contains two other directories, called @@ -1109,9 +1109,9 @@ root 5211 0.0 0.2 3620 1724 2 B1, B2 and C1, C2). - Call A the root file system. If you used - ls to view the contents of this directory you - would see two subdirectories, A1 and + Call A the root file system. If + &man.ls.1; is used to view the contents of this directory, + it will show two subdirectories, A1 and A2. The directory tree looks like this: @@ -1248,9 +1248,9 @@ root 5211 0.0 0.2 3620 1724 2 This is similar, although not identical, to a &ms-dos; join. - Typically you create file systems when installing &os; - and decide where to mount them, and then never change them - unless you add a new disk. + Typically file systems are created when installing &os; + and never change + unless a new disk is added. It is entirely possible to have one large root file system, and not need to create any others. There are some drawbacks to @@ -1283,8 +1283,9 @@ root 5211 0.0 0.2 3620 1724 2 - &os;'s file systems are very robust should you lose - power. However, a power loss at a critical point could + &os;'s file systems are robust if + power is lost. However, a power loss at a critical point + could still damage the structure of the file system. By splitting data over multiple file systems it is more likely that the system will still come up, making it easier to restore from @@ -1361,8 +1362,9 @@ root 5211 0.0 0.2 3620 1724 2 Normally the same size as the enclosing slice. This allows utilities that need to work on the entire slice, such as a bad block scanner, to work on the - c partition. You would not normally - create a file system on this partition. + c partition. A file system would not + normally be + created on this partition. @@ -1390,7 +1392,7 @@ root 5211 0.0 0.2 3620 1724 2 s, starting at 1. So da0s1 is the first slice on the first SCSI drive. There can only be four physical slices on - a disk, but you can have logical slices inside physical slices + a disk, but there can be logical slices inside physical slices of the appropriate type. These extended slices are numbered starting at 5, so ad0s5 is the first extended slice on the first IDE disk. These devices @@ -1410,7 +1412,7 @@ root 5211 0.0 0.2 3620 1724 2 Finally, each disk on the system is identified. A disk name starts with a code that indicates the type of disk, and then a number, indicating which disk it is. Unlike slices, disk - numbering starts at 0. Common codes that you will see are + numbering starts at 0. Common codes are listed in . When referring to a partition, include the disk name, @@ -1586,8 +1588,9 @@ root 5211 0.0 0.2 3620 1724 2 Another common reason to contain certain directory trees on other file systems is if they are to be housed on separate - physical disks, or are separate virtual disks, such as - Network File System mounts, + physical disks, or are separate virtual disks, such as Network + File System mounts, described in + , or CDROM drives. @@ -1598,7 +1601,7 @@ root 5211 0.0 0.2 3620 1724 2 mounted with fstab - During the boot process, + During the boot process (), file systems listed in /etc/fstab are automatically mounted except for the entries containing . This file contains entries in the @@ -1681,7 +1684,7 @@ root 5211 0.0 0.2 3620 1724 2 - The <command>mount</command> Command + Using &man.mount.8; file systems @@ -1808,14 +1811,14 @@ root 5211 0.0 0.2 3620 1724 2 - The <command>umount</command> Command + Using &man.umount.8; file systems unmounting - To unmount a filesystem use &man.umount.8;. This command + To unmount a file system use &man.umount.8;. This command takes one parameter which can be a mountpoint, device name, or . @@ -1843,7 +1846,7 @@ root 5211 0.0 0.2 3620 1724 2 Each process is uniquely identified by a number called a process ID - (PID). Similar to files, each process + (PID). Similar to files, each process has one owner and group, and the owner and group permissions are used to determine which files and devices the process can open. Most processes also have a parent process that started them. @@ -1851,17 +1854,18 @@ root 5211 0.0 0.2 3620 1724 2 the shell is a process which has the shell as its parent process. The exception is a special process called &man.init.8; which is always the first process to start at boot - time and which always has a PID of 1. + time and which always has a PID of 1. To see the processes on the system, use &man.ps.1; and &man.top.1;. To display a static list of the currently running - processes, their PIDs, how much memory they are using, and the - command they were started with, use ps. To + processes, their PIDs, how much memory they + are using, and the + command they were started with, use &man.ps.1;. To display all the running processes and update the display every - few seconds so that you can interactively see what the computer - is doing, use top. + few seconds in order to interactively see what the computer + is doing, use &man.top.1;. - By default, ps only shows the commands + By default, &man.ps.1; only shows the commands that are running and owned by the user. For example: &prompt.user; ps @@ -1883,8 +1887,10 @@ root 5211 0.0 0.2 3620 1724 2 The output from &man.ps.1; is organized into a number of columns. The PID column displays the process - ID. PIDs are assigned starting at 1, go up to 99999, then wrap - around back to the beginning. However, a PID is not reassigned + ID. PIDs are assigned starting at 1, go up + to 99999, then wrap + around back to the beginning. However, a PID + is not reassigned if it is already in use. The TT column shows the tty the program is running on and STAT shows the program's state. TIME is the @@ -1926,7 +1932,8 @@ Swap: 256M Total, 38M Used, 217M Free, 1 ... The output is split into two sections. The header (the - first five lines) shows the PID of the last process to run, the + first five lines) shows the PID of the last + process to run, the system load averages (which are a measure of how busy the system is), the system uptime (time since the last reboot) and the current time. The other figures in the header relate to how @@ -1935,7 +1942,8 @@ Swap: 256M Total, 38M Used, 217M Free, 1 spending in different CPU states. Below the header is a series of columns containing similar - information to the output from &man.ps.1;, such as the PID, + information to the output from &man.ps.1;, such as the + PID, username, amount of CPU time, and the command that started the process. By default, &man.top.1; also displays the amount of memory space taken by the process. This is split into two @@ -1973,13 +1981,13 @@ Swap: 256M Total, 38M Used, 217M Free, 1 daemons with a trailing d. BIND is the Berkeley Internet Name Domain, but the actual program that executes is - named. The Apache + &man.named.8;. The Apache web server program is httpd and the - line printer spooling daemon is lpd. This is + line printer spooling daemon is &man.lpd.8;. This is only a naming convention. For example, the main mail daemon for the Sendmail application is - sendmail, and not - maild. + &man.sendmail.8;, and not + maild. One way to communicate with a daemon, or any running process, is to send a signal using @@ -2041,14 +2049,16 @@ Swap: 256M Total, 38M Used, 217M Free, 1 Sending a Signal to a Process This example shows how to send a signal to &man.inetd.8;. - The inetd configuration file is + The &man.inetd.8; configuration file is /etc/inetd.conf, and - inetd will re-read this configuration file + &man.inetd.8; will re-read this configuration file when it is sent a SIGHUP. - Find the PID of the process you want to send the signal - to using &man.pgrep.1;. In this example, the PID for + Find the PID of the process to send + the signal + to using &man.pgrep.1;. In this example, the + PID for &man.inetd.8; is 198: &prompt.user; pgrep -l inetd @@ -2066,12 +2076,14 @@ Swap: 256M Total, 38M Used, 217M Free, 1 &prompt.root; /bin/kill -s HUP 198 Like most &unix; commands, &man.kill.1; will not print - any output if it is successful. If you send a signal to a - process that you do not own, you will instead see + any output if it is successful. If a signal is sent to a + process not owned by that user, the message kill: PID: Operation - not permitted. Mistyping the PID will either + not permitted will be displayed. Mistyping + the PID will either send the signal to the wrong process, which could have - negative results, or will send the signal to a PID that is + negative results, or will send the signal to a + PID that is not currently in use, resulting in the error kill: PID: No such process. @@ -2098,7 +2110,8 @@ Swap: 256M Total, 38M Used, 217M Free, 1 Killing a random process on the system can be a bad idea. - In particular, &man.init.8;, PID 1, is special. Running + In particular, &man.init.8;, PID 1, is + special. Running /bin/kill -s KILL 1 is a quick, and unrecommended, way to shutdown the system. Always double check the arguments to @@ -2118,14 +2131,15 @@ Swap: 256M Total, 38M Used, 217M Free, 1 them. Many shells provide built in functions to help with everyday tasks such as file management, file globbing, command line editing, command macros, and environment variables. &os; - comes with several shells, including sh, the - Bourne Shell, and tcsh, the improved C-shell. + comes with several shells, including the + Bourne shell (&man.sh.1;) and the extended C shell + (&man.tcsh.1;). Other shells are available from the &os; Ports Collection, such as zsh and bash. The shell that is used is really a matter of taste. A C programmer might feel more comfortable with a C-like shell such - as tcsh. A Linux user might prefer + as &man.tcsh.1;. A &linux; user might prefer bash. Each shell has unique properties that may or may not work with a user's preferred working environment, which is why there is a choice of which shell to use. @@ -2182,7 +2196,8 @@ Swap: 256M Total, 38M Used, 217M Free, 1 DISPLAY - Network name of the Xorg + Network name of the + &xorg; display to connect to, if available. @@ -2237,13 +2252,13 @@ Swap: 256M Total, 38M Used, 217M Free, 1 Bourne shells How to set an environment variable differs between shells. - In tcsh and csh, use + In &man.tcsh.1; and &man.csh.1;, use setenv to set environment variables. In - sh and bash, use + &man.sh.1; and bash, use export to set the current environment variables. This example sets the default EDITOR to /usr/local/bin/emacs for the - tcsh shell: + &man.tcsh.1; shell: &prompt.user; setenv EDITOR /usr/local/bin/emacs @@ -2264,8 +2279,8 @@ Swap: 256M Total, 38M Used, 217M Free, 1 represents any number of characters in a filename. Meta-characters can be used to perform filename globbing. For example, echo * is equivalent to - ls because the shell takes all the files that - match * and echo lists + &man.ls.1; because the shell takes all the files that + match * and &man.echo.1; lists them on the command line. To prevent the shell from interpreting a special character, @@ -2282,7 +2297,7 @@ Swap: 256M Total, 38M Used, 217M Free, 1 to use chsh. Running this command will open the editor that is configured in the EDITOR environment variable, which by default - is set to vi. Change + is set to &man.vi.1;. Change the Shell: line to the full path of the new shell. @@ -2295,15 +2310,16 @@ Swap: 256M Total, 38M Used, 217M Free, 1 The new shell must be present in /etc/shells. If the shell was - installed from the &os; Ports - Collection, it should be automatically added to + installed from the &os; Ports + Collection as described in , it + should be automatically added to this file. If it is missing, add it using this command, replacing the path with the path of the shell: &prompt.root; echo /usr/local/bin/bash >> /etc/shells - Then rerun chsh. + Then rerun &man.chsh.1;. @@ -2324,10 +2340,10 @@ Swap: 256M Total, 38M Used, 217M Free, 1 editors - ee + &man.ee.1; - A simple editor to learn is ee, + A simple editor to learn is &man.ee.1;, which stands for easy editor. To start this editor, type ee filename where filename is the name of the file to @@ -2337,18 +2353,18 @@ Swap: 256M Total, 38M Used, 217M Free, 1 Ctrl, so ^e expands to Ctrle. - To leave ee, press + To leave &man.ee.1;, press Esc, then choose the leave editor option from the main menu. The editor will - prompt you to save any changes if the file has been + prompt to save any changes if the file has been modified. - vi + &man.vi.1; editors - vi + &man.vi.1; emacs @@ -2358,8 +2374,8 @@ Swap: 256M Total, 38M Used, 217M Free, 1 emacs - &os; also comes with more powerful text editors such as - vi as part of the base system. + &os; also comes with more powerful text editors, such as + &man.vi.1;, as part of the base system. Other editors, like editors/emacs and editors/vim, are part of the @@ -2372,8 +2388,7 @@ Swap: 256M Total, 38M Used, 217M Free, 1 Many applications which modify files or require typed input will automatically open a text editor. To alter the default editor used, set the EDITOR environment - variable as described in the shells section. + variable as described in . @@ -2529,7 +2544,7 @@ Swap: 256M Total, 38M Used, 217M Free, 1 cross compilers and plugging in different formats. Those who wanted to build cross compilers targeting &os; were out of luck since the older sources that &os; had for - as and ld + &man.as.1; and &man.ld.1; were not up to the task. The new GNU tools chain (binutils) supports cross compiling, ELF, shared libraries, and C++ @@ -2568,8 +2583,8 @@ Swap: 256M Total, 38M Used, 217M Free, 1 &prompt.user; man command where command is the name of - the command you wish to learn about. For example, to learn - more about ls, type: + the command to learn about. For example, to learn + more about &man.ls.1;, type: &prompt.user; man ls @@ -2616,21 +2631,21 @@ Swap: 256M Total, 38M Used, 217M Free, 1 In some cases, the same topic may appear in more than one section of the online manual. For example, there is a - chmod user command and a + &man.chmod.1; user command and a chmod() system call. To tell - man which section to display, specify the + &man.man.1; which section to display, specify the section number: &prompt.user; man 1 chmod This will display the manual page for the user command - chmod. References to a particular section + &man.chmod.1;. References to a particular section of the online manual are traditionally placed in parenthesis in written documentation, so &man.chmod.1; refers to the - chmod user command and &man.chmod.2; refers + user command and &man.chmod.2; refers to the system call. - If you do not know the command name, use man + If the command name is unknown, use man -k to search for keywords in the command descriptions: @@ -2665,7 +2680,7 @@ Swap: 256M Total, 38M Used, 217M Free, 1 by the Free Software Foundation (FSF). In addition to manual pages, these programs may include hypertext documents called info files. These can be viewed using - info or, if editors/emacs is installed, the info mode of emacs.