- Revise some comma usage

- Revise wording of some sentences
- Use <acronym> and <filename> tags
- Follow FDP on continuous repetition of &man.command.#;
- Write out numbers under 10
- Show an example of complete output of "ls -l" command
- Mention after successfully logging in, you will see the MOTD, and
  the command prompt
- Remove misleading comment about how chmod ### can only "set and
  assign" permissions, but not remove them.
- "CPU time evenly to each user" -> "CPU time fairly to each user"
- "permissions stored as two octets" -> "permissions stored as three
  octets"

Sponsored by:	FreeBSD Mall, Inc.
This commit is contained in:
Chern Lee 2003-10-01 01:18:53 +00:00
parent 0541916663
commit 277441b9e8
Notes: svn2git 2020-12-08 03:00:23 +00:00
svn path=/head/; revision=18284

View file

@ -74,17 +74,17 @@
<indexterm><primary>UNIX</primary></indexterm> <indexterm><primary>UNIX</primary></indexterm>
<para>FreeBSD, being a direct descendant of BSD &unix;, is based on <para>FreeBSD, being a direct descendant of BSD &unix;, is based on
several key &unix; concepts. The first, and several key &unix; concepts. The first and
most pronounced, is that FreeBSD is a multi-user operating system. most pronounced is that FreeBSD is a multi-user operating system.
The system can handle several users all working simultaneously on The system can handle several users all working simultaneously on
completely unrelated tasks. The system is responsible for properly completely unrelated tasks. The system is responsible for properly
sharing and managing requests for hardware devices, peripherals, sharing and managing requests for hardware devices, peripherals,
memory, and CPU time evenly to each user.</para> memory, and CPU time fairly to each user.</para>
<para>Because the system is capable of supporting multiple users, <para>Because the system is capable of supporting multiple users,
everything the system manages has a set of permissions governing who everything the system manages has a set of permissions governing who
can read, write, and execute the resource. These permissions are can read, write, and execute the resource. These permissions are
stored as two octets broken into three pieces, one for the owner of stored as three octets broken into three pieces, one for the owner of
the file, one for the group that the file belongs to, and one for the file, one for the group that the file belongs to, and one for
everyone else. This numerical representation works like everyone else. This numerical representation works like
this:</para> this:</para>
@ -162,8 +162,18 @@
<para>You can use the <option>-l</option> command line <para>You can use the <option>-l</option> command line
argument to &man.ls.1; to view a long directory listing that argument to &man.ls.1; to view a long directory listing that
includes a column with information about a file's permissions includes a column with information about a file's permissions
for the owner, group, and everyone else. Here is how the first for the owner, group, and everyone else. For example, a
column of <command>ls -l</command> is broken up:</para> <command>ls -l</command> in an arbitrary directory may show:</para>
<screen>&prompt.user; ls -l
total 530
-rw-r--r-- 1 root wheel 512 Sep 5 12:31 myfile
-rw-r--r-- 1 root wheel 512 Sep 5 12:31 otherfile
-rw-r--r-- 1 root wheel 7680 Sep 5 12:31 email.txt
...</screen>
<para>Here is how the first column of <command>ls -l</command> is
broken up:</para>
<screen>-rw-r--r--</screen> <screen>-rw-r--r--</screen>
@ -193,8 +203,8 @@
<para>Directories are also treated as files. They have read, write, <para>Directories are also treated as files. They have read, write,
and execute permissions. The executable bit for a directory has a and execute permissions. The executable bit for a directory has a
slightly different meaning than that of files. When a directory is slightly different meaning than that of files. When a directory is
marked executable, it means it can be moved into, i.e. it is marked executable, it means it can be traversed into, that is, it is
possible to <quote>cd</quote> into it. This also means that possible to <quote>cd</quote> (change directory) into it. This also means that
within the directory it is possible to access files whose names are within the directory it is possible to access files whose names are
known (subject, of course, to the permissions on the files known (subject, of course, to the permissions on the files
themselves).</para> themselves).</para>
@ -331,9 +341,11 @@
<screen>&prompt.user; <userinput>chmod go-w,a+x <replaceable>FILE</replaceable></userinput></screen> <screen>&prompt.user; <userinput>chmod go-w,a+x <replaceable>FILE</replaceable></userinput></screen>
<!--
<para>Most users will not notice this, but it should be pointed out <para>Most users will not notice this, but it should be pointed out
that using the octal method will only set or assign permissions to that using the octal method will only set or assign permissions to
a file; it does not add or delete them.</para> a file; it does not add or delete them.</para>
-->
</sect2> </sect2>
</sect1> </sect1>
@ -1244,7 +1256,7 @@
<listitem> <listitem>
<para>Mount all the file systems listed in <para>Mount all the file systems listed in
<filename>/etc/fstab</filename>. Exceptions are those <filename>/etc/fstab</filename>. Except those
marked as <quote>noauto</quote>, excluded by the marked as <quote>noauto</quote>, excluded by the
<option>-t</option> flag, or those that are already <option>-t</option> flag, or those that are already
mounted.</para> mounted.</para>
@ -1255,7 +1267,7 @@
<term><option>-d</option></term> <term><option>-d</option></term>
<listitem> <listitem>
<para>Do everything except for the actual system call. <para>Do everything except for the actual mount system call.
This option is useful in conjunction with the This option is useful in conjunction with the
<option>-v</option> flag to determine what <option>-v</option> flag to determine what
&man.mount.8; is actually trying to do.</para> &man.mount.8; is actually trying to do.</para>
@ -1400,19 +1412,19 @@
then the shell is a process, and any commands you run are also then the shell is a process, and any commands you run are also
processes. Each process you run in this way will have your shell as its processes. Each process you run in this way will have your shell as its
parent process. The exception to this is a special process called parent process. The exception to this is a special process called
<command>init</command>. <command>init</command> is always the first &man.init.8;. <command>init</command> is always the first
process, so its PID is always 1. <command>init</command> is started process, so its PID is always 1. <command>init</command> is started
automatically by the kernel when FreeBSD starts.</para> automatically by the kernel when FreeBSD starts.</para>
<para>Two commands are particularly useful to see the processes on the <para>Two commands are particularly useful to see the processes on the
system, &man.ps.1; and &man.top.1;. The &man.ps.1; command is used to system, &man.ps.1; and &man.top.1;. The <command>ps</command> command is used to
show a static list of the currently running processes, and can show show a static list of the currently running processes, and can show
their PID, how much memory they are using, the command line they were their PID, how much memory they are using, the command line they were
started with, and so on. The &man.top.1; command displays all the started with, and so on. The <command>top</command> command displays all the
running processes, and updates the display every few seconds, so that running processes, and updates the display every few seconds, so that
you can interactively see what your computer is doing.</para> you can interactively see what your computer is doing.</para>
<para>By default, &man.ps.1; only shows you the commands that are running <para>By default, <command>ps</command> only shows you the commands that are running
and are owned by you. For example:</para> and are owned by you. For example:</para>
<screen>&prompt.user; <userinput>ps</userinput> <screen>&prompt.user; <userinput>ps</userinput>
@ -1438,12 +1450,12 @@
organized into a number of columns. <literal>PID</literal> is the organized into a number of columns. <literal>PID</literal> is the
process ID discussed earlier. PIDs are assigned starting from 1, go up process ID discussed earlier. PIDs are assigned starting from 1, go up
to 99999, and wrap around back to the beginning when you run out. to 99999, and wrap around back to the beginning when you run out.
<literal>TT</literal> shows the tty the program is running on, and can The <literal>TT</literal> column shows the tty the program is running on, and can
safely be ignored for the moment. <literal>STAT</literal> shows the safely be ignored for the moment. <literal>STAT</literal> shows the
program's state, and again, can be safely ignored. program's state, and again, can be safely ignored.
<literal>TIME</literal> is the amount of time the program has been <literal>TIME</literal> is the amount of time the program has been
running on the CPU&mdash;this is not necessarily the elapsed time since running on the CPU&mdash;this is usually not the elapsed time since
you started the program, as some programs spend a lot of time waiting you started the program, as most programs spend a lot of time waiting
for things to happen before they need to spend time on the CPU. for things to happen before they need to spend time on the CPU.
Finally, <literal>COMMAND</literal> is the command line that was used to Finally, <literal>COMMAND</literal> is the command line that was used to
run the program.</para> run the program.</para>
@ -1600,8 +1612,8 @@ Swap: 256M Total, 38M Used, 217M Free, 15% Inuse
<title>Sending a Signal to a Process</title> <title>Sending a Signal to a Process</title>
<para>This example shows how to send a signal to &man.inetd.8;. The <para>This example shows how to send a signal to &man.inetd.8;. The
&man.inetd.8; configuration file is <command>inetd</command> configuration file is
<filename>/etc/inetd.conf</filename>, and &man.inetd.8; will re-read <filename>/etc/inetd.conf</filename>, and <command>inetd</command> will re-read
this configuration file when it is sent this configuration file when it is sent
<literal>SIGHUP</literal>.</para> <literal>SIGHUP</literal>.</para>
@ -1798,7 +1810,7 @@ Swap: 256M Total, 38M Used, 217M Free, 15% Inuse
</informaltable> </informaltable>
<indexterm><primary>Bourne shells</primary></indexterm> <indexterm><primary>Bourne shells</primary></indexterm>
<para>To set an environment variable differs somewhat from <para>Setting an environment variable differs somewhat from
shell to shell. For example, in the C-Style shells such as shell to shell. For example, in the C-Style shells such as
<command>tcsh</command> and <command>csh</command>, you would use <command>tcsh</command> and <command>csh</command>, you would use
<command>setenv</command> to set environment variables. <command>setenv</command> to set environment variables.
@ -1903,7 +1915,7 @@ Swap: 256M Total, 38M Used, 217M Free, 15% Inuse
<command>ee /etc/rc.conf</command>. Once inside of <command>ee /etc/rc.conf</command>. Once inside of
<command>ee</command>, all of the <command>ee</command>, all of the
commands for manipulating the editor's functions are listed at the commands for manipulating the editor's functions are listed at the
top of the display. The caret <literal>^</literal> character means top of the display. The caret <literal>^</literal> character represents
the <keycap>Ctrl</keycap> key on the keyboard, so <literal>^e</literal> expands to the key combination the <keycap>Ctrl</keycap> key on the keyboard, so <literal>^e</literal> expands to the key combination
<keycombo action="simul"><keycap>Ctrl</keycap><keycap>e</keycap></keycombo>. To leave <keycombo action="simul"><keycap>Ctrl</keycap><keycap>e</keycap></keycombo>. To leave
<application>ee</application>, hit the <keycap>Esc</keycap> key, then choose leave <application>ee</application>, hit the <keycap>Esc</keycap> key, then choose leave
@ -2092,6 +2104,11 @@ Password:</screen>
<para>If you have typed your password correctly, you should by now be <para>If you have typed your password correctly, you should by now be
logged into FreeBSD and ready to try out all the available logged into FreeBSD and ready to try out all the available
commands.</para> commands.</para>
<para>You should see the <acronym>MOTD</acronym> or message of
the day followed by a command prompt (a <literal>#</literal>,
<literal>$</literal>, or <literal>$</literal> character). This
indicates you have successfully logged into FreeBSD.</para>
</sect2> </sect2>
<sect2 id="consoles-virtual"> <sect2 id="consoles-virtual">
@ -2137,7 +2154,7 @@ Password:</screen>
<sect2 id="consoles-ttys"> <sect2 id="consoles-ttys">
<title>The <filename>/etc/ttys</filename> File</title> <title>The <filename>/etc/ttys</filename> File</title>
<para>The default configuration of FreeBSD will start up with 8 <para>The default configuration of FreeBSD will start up with eight
virtual consoles. This is not a hardwired setting though, and virtual consoles. This is not a hardwired setting though, and
you can easily customize your installation to boot with more you can easily customize your installation to boot with more
or fewer virtual consoles. The number and settings of the or fewer virtual consoles. The number and settings of the
@ -2148,8 +2165,8 @@ Password:</screen>
the virtual consoles of FreeBSD. Each uncommented line in this file the virtual consoles of FreeBSD. Each uncommented line in this file
(lines that do not start with a <literal>#</literal> character) contains (lines that do not start with a <literal>#</literal> character) contains
settings for a single terminal or virtual console. The default settings for a single terminal or virtual console. The default
version of this file that ships with FreeBSD configures 9 virtual version of this file that ships with FreeBSD configures nine virtual
consoles, and enables 8 of them. They are the lines that start with consoles, and enables eight of them. They are the lines that start with
<literal>ttyv</literal>:</para> <literal>ttyv</literal>:</para>
<programlisting># name getty type status comments <programlisting># name getty type status comments
@ -2195,7 +2212,7 @@ console none unknown off secure</programlisting>
<username>root</username> password.</para> <username>root</username> password.</para>
<para><emphasis>Be careful when changing this to <para><emphasis>Be careful when changing this to
<literal>insecure</literal> though.</emphasis> If you ever forget <literal>insecure</literal></emphasis> If you ever forget
the <username>root</username> password, booting into single user the <username>root</username> password, booting into single user
mode is a bit involved. It is still possible, but it might be a bit mode is a bit involved. It is still possible, but it might be a bit
hard for someone who is not very comfortable with the FreeBSD hard for someone who is not very comfortable with the FreeBSD
@ -2208,7 +2225,7 @@ console none unknown off secure</programlisting>
<title>Binary Formats</title> <title>Binary Formats</title>
<para>To understand why FreeBSD uses the <acronym>ELF</acronym> <para>To understand why FreeBSD uses the <acronym>ELF</acronym>
format, you must first know a little about the 3 currently format, you must first know a little about the three currently
<quote>dominant</quote> executable formats for &unix;:</para> <quote>dominant</quote> executable formats for &unix;:</para>
<itemizedlist> <itemizedlist>
@ -2286,7 +2303,7 @@ console none unknown off secure</programlisting>
force software to do some sleazy tricks, then he would be able force software to do some sleazy tricks, then he would be able
to shave a few gates off the design and allow his CPU core to to shave a few gates off the design and allow his CPU core to
run faster. While it was made to work with this new kind of run faster. While it was made to work with this new kind of
hardware (known these days as RISC), <filename>a.out</filename> hardware (known these days as <acronym>RISC</acronym>), <filename>a.out</filename>
was ill-suited for this hardware, so many formats were developed was ill-suited for this hardware, so many formats were developed
to get to a better performance from this hardware than the to get to a better performance from this hardware than the
limited, simple <filename>a.out</filename> format could limited, simple <filename>a.out</filename> format could
@ -2322,7 +2339,7 @@ console none unknown off secure</programlisting>
added shared libraries and fixed some bugs. The GNU folks that added shared libraries and fixed some bugs. The GNU folks that
originally write these programs rewrote them and added simpler originally write these programs rewrote them and added simpler
support for building cross compilers, plugging in different support for building cross compilers, plugging in different
formats at will, etc. Since many people wanted to build cross formats at will, and so on. Since many people wanted to build cross
compilers targeting FreeBSD, they were out of luck since the compilers targeting FreeBSD, they were out of luck since the
older sources that FreeBSD had for <application>as</application> and <application>ld</application> were not up to the older sources that FreeBSD had for <application>as</application> and <application>ld</application> were not up to the
task. The new GNU tools chain (<application>binutils</application>) does support cross task. The new GNU tools chain (<application>binutils</application>) does support cross
@ -2340,7 +2357,7 @@ console none unknown off secure</programlisting>
details that are different between the two in how they map details that are different between the two in how they map
pages, handle init code, etc. None of these are very important, pages, handle init code, etc. None of these are very important,
but they are differences. In time support for but they are differences. In time support for
<filename>a.out</filename> will be moved out of the GENERIC <filename>a.out</filename> will be moved out of the <filename>GENERIC</filename>
kernel, and eventually removed from the kernel once the need to kernel, and eventually removed from the kernel once the need to
run legacy <filename>a.out</filename> programs is past.</para> run legacy <filename>a.out</filename> programs is past.</para>
</sect1> </sect1>