Whitespace change only. Re-wrap paragraphs after previous commit.
This commit is contained in:
parent
71152126bb
commit
c3b5bf8e85
Notes:
svn2git
2020-12-08 03:00:23 +00:00
svn path=/head/; revision=10805
1 changed files with 163 additions and 146 deletions
|
@ -1,4 +1,4 @@
|
|||
<!-- $FreeBSD: doc/en_US.ISO8859-1/articles/new-users/article.sgml,v 1.25 2001/09/17 01:29:35 murray Exp $ -->
|
||||
<!-- $FreeBSD: doc/en_US.ISO8859-1/articles/new-users/article.sgml,v 1.26 2001/09/24 01:32:07 murray Exp $ -->
|
||||
<!-- The FreeBSD Documentation Project -->
|
||||
|
||||
<!DOCTYPE ARTICLE PUBLIC "-//FreeBSD//DTD DocBook V4.1-Based Extension//EN" [
|
||||
|
@ -38,17 +38,17 @@
|
|||
<sect1>
|
||||
<title>Logging in and Getting Out</title>
|
||||
|
||||
<para>Log in (when you see <prompt
|
||||
>login:</prompt>) as a user you created during
|
||||
installation or as <firstterm>root</firstterm>. (Your FreeBSD
|
||||
installation will already have an account for root; root can go
|
||||
anywhere and do anything, including deleting essential files, so
|
||||
be careful!) The symbols &prompt.user; and &prompt.root; in the following stand for the
|
||||
prompt (yours may be different), with &prompt.user; indicating an ordinary
|
||||
user and &prompt.root; indicating root.</para>
|
||||
<para>Log in (when you see <prompt >login:</prompt>) as a user you
|
||||
created during installation or as <firstterm>root</firstterm>.
|
||||
(Your FreeBSD installation will already have an account for
|
||||
root; root can go anywhere and do anything, including deleting
|
||||
essential files, so be careful!) The symbols &prompt.user; and
|
||||
&prompt.root; in the following stand for the prompt (yours may
|
||||
be different), with &prompt.user; indicating an ordinary user
|
||||
and &prompt.root; indicating root.</para>
|
||||
|
||||
<para>To log out (and get a new <prompt
|
||||
>login:</prompt> prompt) type</para>
|
||||
<para>To log out (and get a new <prompt >login:</prompt> prompt)
|
||||
type</para>
|
||||
|
||||
<informalexample>
|
||||
<screen>&prompt.root; <userinput>exit</userinput></screen>
|
||||
|
@ -97,9 +97,10 @@
|
|||
</informalexample>
|
||||
|
||||
<para>The first time you use adduser, it might ask for some
|
||||
defaults to save. You might want to make the default shell &man.csh.1;
|
||||
instead of &man.sh.1;, if it suggests <command>sh</command> as the default. Otherwise just
|
||||
press enter to accept each default. These defaults are saved in
|
||||
defaults to save. You might want to make the default shell
|
||||
&man.csh.1; instead of &man.sh.1;, if it suggests
|
||||
<command>sh</command> as the default. Otherwise just press
|
||||
enter to accept each default. These defaults are saved in
|
||||
<filename>/etc/adduser.conf</filename>, an editable file.</para>
|
||||
|
||||
<para>Suppose you create a user <username>jack</username> with
|
||||
|
@ -134,9 +135,9 @@
|
|||
<para>If you already created a user and you want the user to be
|
||||
able to <command>su</command> to root, you can log in as root
|
||||
and edit the file <filename>/etc/group</filename>, adding jack
|
||||
to the first line (the group <groupname>wheel</groupname>). But first you need to
|
||||
practice &man.vi.1;, the text editor—or use the
|
||||
simpler text editor, &man.ee.1;, installed on recent
|
||||
to the first line (the group <groupname>wheel</groupname>). But
|
||||
first you need to practice &man.vi.1;, the text editor—or
|
||||
use the simpler text editor, &man.ee.1;, installed on recent
|
||||
version of FreeBSD.</para>
|
||||
|
||||
<para>To delete a user, use the <command>rmuser</command>
|
||||
|
@ -213,13 +214,13 @@
|
|||
|
||||
<listitem>
|
||||
<para>Changes directories. <command>cd
|
||||
<parameter>..</parameter></command> backs up one level;
|
||||
<parameter>..</parameter></command> backs up one level;
|
||||
note the space after <command>cd</command>. <command>cd
|
||||
<parameter>/usr/local</parameter></command> goes there.
|
||||
<command>cd <parameter>~</parameter></command> goes to
|
||||
the home directory of the person logged in—e.g.,
|
||||
<parameter>/usr/local</parameter></command> goes there.
|
||||
<command>cd <parameter>~</parameter></command> goes to the
|
||||
home directory of the person logged in—e.g.,
|
||||
<filename>/usr/home/jack</filename>. Try <command>cd
|
||||
<parameter>/cdrom</parameter></command>, and then
|
||||
<parameter>/cdrom</parameter></command>, and then
|
||||
<command>ls</command>, to find out if your CDROM is
|
||||
mounted and working.</para>
|
||||
</listitem>
|
||||
|
@ -400,10 +401,10 @@
|
|||
down menus in windows managers. You might want to get one of
|
||||
the two leading books on systems administration, either Evi
|
||||
Nemeth et.al.'s <citetitle>UNIX System Administration
|
||||
Handbook</citetitle> (Prentice-Hall, 1995, ISBN
|
||||
Handbook</citetitle> (Prentice-Hall, 1995, ISBN
|
||||
0-13-15051-7)—the second edition with the red cover; or
|
||||
Æleen Frisch's <citetitle>Essential System
|
||||
Administration</citetitle> (O'Reilly & Associates, 1993,
|
||||
Administration</citetitle> (O'Reilly & Associates, 1993,
|
||||
ISBN 0-937175-80-3). I used Nemeth.</para>
|
||||
</sect1>
|
||||
|
||||
|
@ -577,28 +578,30 @@
|
|||
</varlistentry>
|
||||
</variablelist>
|
||||
|
||||
<para>Practice with <command>vi</command> in your home directory by
|
||||
creating a new file with <command>vi <replaceable>filename</replaceable></command>
|
||||
and adding and deleting text, saving the file, and calling it up
|
||||
again. <command>vi</command> delivers some surprises because it's
|
||||
<para>Practice with <command>vi</command> in your home directory
|
||||
by creating a new file with <command>vi
|
||||
<replaceable>filename</replaceable></command> and adding and
|
||||
deleting text, saving the file, and calling it up again.
|
||||
<command>vi</command> delivers some surprises because it's
|
||||
really quite complex, and sometimes you'll inadvertently issue a
|
||||
command that will do something you don't expect. (Some people
|
||||
actually like <command>vi</command>—it's more powerful than DOS
|
||||
EDIT—find out about the <command>:r</command> command.) Use
|
||||
<keycap>Esc</keycap> one or more times to be sure you're in command
|
||||
mode and proceed from there when it gives you trouble, save
|
||||
often with <command>:w</command>, and use <command>:q!</command> to get out
|
||||
and start over (from your last <command>:w</command>) when you need
|
||||
to.</para>
|
||||
actually like <command>vi</command>—it's more powerful
|
||||
than DOS EDIT—find out about the <command>:r</command>
|
||||
command.) Use <keycap>Esc</keycap> one or more times to be sure
|
||||
you're in command mode and proceed from there when it gives you
|
||||
trouble, save often with <command>:w</command>, and use
|
||||
<command>:q!</command> to get out and start over (from your last
|
||||
<command>:w</command>) when you need to.</para>
|
||||
|
||||
<para>Now you can <command>cd</command> to <filename>/etc</filename>,
|
||||
<command>su</command> to root, use <command>vi</command> to edit the file
|
||||
<para>Now you can <command>cd</command> to
|
||||
<filename>/etc</filename>, <command>su</command> to root, use
|
||||
<command>vi</command> to edit the file
|
||||
<filename>/etc/group</filename>, and add a user to wheel so the
|
||||
user has root privileges. Just add a comma and the user's login
|
||||
name to the end of the first line in the file, press
|
||||
<keycap>Esc</keycap>, and use <command>:wq</command> to write the file to
|
||||
disk and quit. Instantly effective. (You didn't put a space
|
||||
after the comma, did you?)</para>
|
||||
<keycap>Esc</keycap>, and use <command>:wq</command> to write
|
||||
the file to disk and quit. Instantly effective. (You didn't
|
||||
put a space after the comma, did you?)</para>
|
||||
</sect1>
|
||||
|
||||
<sect1>
|
||||
|
@ -608,8 +611,8 @@
|
|||
so here's a way to create a file from a man page, move it to a
|
||||
floppy, and then print it from DOS. Suppose you want to read
|
||||
carefully about changing permissions on files (pretty
|
||||
important). You can use <command>man chmod</command> to read about it.
|
||||
The command</para>
|
||||
important). You can use <command>man chmod</command> to read
|
||||
about it. The command</para>
|
||||
|
||||
<informalexample>
|
||||
<screen>&prompt.user; <userinput>man chmod | col -b > chmod.txt</></screen>
|
||||
|
@ -628,9 +631,10 @@
|
|||
<filename>/mnt</filename>.</para>
|
||||
|
||||
<para>Now (you no longer need to be root, and you can type
|
||||
<command>exit</command> to get back to being user jack) you can go to
|
||||
the directory where you created <filename>chmod.txt</filename> and copy the file to
|
||||
the floppy with:</para>
|
||||
<command>exit</command> to get back to being user jack) you can
|
||||
go to the directory where you created
|
||||
<filename>chmod.txt</filename> and copy the file to the floppy
|
||||
with:</para>
|
||||
|
||||
<informalexample>
|
||||
<screen>&prompt.user; <userinput>cp chmod.txt /mnt</></screen>
|
||||
|
@ -653,7 +657,7 @@
|
|||
it booted up. If you ask questions on
|
||||
<email>freebsd-questions@FreeBSD.org</email> or on a USENET
|
||||
group—like <quote>FreeBSD isn't finding my tape drive,
|
||||
what do I do?</quote>—people will want to know what
|
||||
what do I do?</quote>—people will want to know what
|
||||
<command>dmesg</command> has to say.</para>
|
||||
|
||||
<para>You can now dismount the floppy drive (as root) to get the
|
||||
|
@ -668,23 +672,25 @@
|
|||
Wordpad, or a word processor, make a minor change so the file
|
||||
has to be saved, and print as you normally would from DOS or
|
||||
Windows. Hope it works! man pages come out best if printed
|
||||
with the DOS <command>print</command> command. (Copying files from
|
||||
FreeBSD to a mounted DOS partition is in some cases still a
|
||||
with the DOS <command>print</command> command. (Copying files
|
||||
from FreeBSD to a mounted DOS partition is in some cases still a
|
||||
little risky.)</para>
|
||||
|
||||
<para>Getting the printer printing from FreeBSD involves creating
|
||||
an appropriate entry in <filename>/etc/printcap</filename> and
|
||||
creating a matching spool directory in
|
||||
<filename>/var/spool/output</filename>. If your printer is on
|
||||
<hardware>lpt0</hardware> (what DOS calls <hardware>LPT1</hardware>), you may
|
||||
only need to go to <filename>/var/spool/output</filename> and
|
||||
(as root) create the directory <filename>lpd</filename> by typing:
|
||||
<command>mkdir lpd</command>, if it doesn't already exist.
|
||||
Then the printer should respond if it's turned on when the
|
||||
system is booted, and <command>lp</command> or <command>lpr</command> should send a file to the
|
||||
printer. Whether or not the file actually prints depends on
|
||||
configuring it, which is covered in the <ulink
|
||||
URL="../../books/handbook/handbook.html">FreeBSD handbook.</ulink></para>
|
||||
<hardware>lpt0</hardware> (what DOS calls
|
||||
<hardware>LPT1</hardware>), you may only need to go to
|
||||
<filename>/var/spool/output</filename> and (as root) create the
|
||||
directory <filename>lpd</filename> by typing: <command>mkdir
|
||||
lpd</command>, if it doesn't already exist. Then the printer
|
||||
should respond if it's turned on when the system is booted, and
|
||||
<command>lp</command> or <command>lpr</command> should send a
|
||||
file to the printer. Whether or not the file actually prints
|
||||
depends on configuring it, which is covered in the <ulink
|
||||
URL="../../books/handbook/handbook.html">FreeBSD
|
||||
handbook.</ulink></para>
|
||||
</sect1>
|
||||
|
||||
<sect1>
|
||||
|
@ -764,8 +770,9 @@
|
|||
</informalexample>
|
||||
|
||||
<para>You can use <literal>*</literal> as a wildcard in
|
||||
<parameter>"<replaceable>filename</replaceable>"</parameter> (which should be in
|
||||
quotes). If you tell <command>find</command> to search in <filename>/</filename>
|
||||
<parameter>"<replaceable>filename</replaceable>"</parameter>
|
||||
(which should be in quotes). If you tell
|
||||
<command>find</command> to search in <filename>/</filename>
|
||||
instead of <filename>/usr</filename> it will look for the
|
||||
file(s) on all mounted file systems, including the CDROM and the
|
||||
DOS partition.</para>
|
||||
|
@ -785,14 +792,15 @@
|
|||
edit files, so you can get everything up and running. There is
|
||||
a great deal of information in the FreeBSD handbook (which is
|
||||
probably on your hard drive) and <ulink
|
||||
URL="http://www.FreeBSD.org/">FreeBSD's web site</ulink>. A
|
||||
wide variety of packages and ports are on the CDROM as well
|
||||
as the web site. The handbook tells you more about how to use
|
||||
them (get the package if it exists, with <command>pkg_add
|
||||
/cdrom/packages/All/<replaceable>packagename</replaceable></command>, where
|
||||
<replaceable>packagename</replaceable> is the filename of the
|
||||
package). The CDROM has lists of the packages and ports with
|
||||
brief descriptions in <filename>cdrom/packages/index</filename>,
|
||||
URL="http://www.FreeBSD.org/">FreeBSD's web site</ulink>. A
|
||||
wide variety of packages and ports are on the CDROM as well as
|
||||
the web site. The handbook tells you more about how to use them
|
||||
(get the package if it exists, with <command>pkg_add
|
||||
/cdrom/packages/All/<replaceable>packagename</replaceable></command>,
|
||||
where <replaceable>packagename</replaceable> is the filename of
|
||||
the package). The CDROM has lists of the packages and ports
|
||||
with brief descriptions in
|
||||
<filename>cdrom/packages/index</filename>,
|
||||
<filename>cdrom/packages/index.txt</filename>, and
|
||||
<filename>cdrom/ports/index</filename>, with fuller descriptions
|
||||
in <filename>/cdrom/ports/*/*/pkg/DESCR</filename>, where the
|
||||
|
@ -800,13 +808,14 @@
|
|||
programs and program names respectively.</para>
|
||||
|
||||
<para>If you find the handbook too sophisticated (what with
|
||||
<command>lndir</command> and all) on installing ports from the CDROM,
|
||||
here's what usually works:</para>
|
||||
<command>lndir</command> and all) on installing ports from the
|
||||
CDROM, here's what usually works:</para>
|
||||
|
||||
<para>Find the port you want, say <command>kermit</command>. There will
|
||||
be a directory for it on the CDROM. Copy the subdirectory to
|
||||
<filename>/usr/local</filename> (a good place for software you
|
||||
add that should be available to all users) with:</para>
|
||||
<para>Find the port you want, say <command>kermit</command>.
|
||||
There will be a directory for it on the CDROM. Copy the
|
||||
subdirectory to <filename>/usr/local</filename> (a good place
|
||||
for software you add that should be available to all users)
|
||||
with:</para>
|
||||
|
||||
<informalexample>
|
||||
<screen>&prompt.root; <userinput>cp -R /cdrom/ports/comm/kermit /usr/local</></screen>
|
||||
|
@ -841,17 +850,17 @@
|
|||
<filename>/cdrom/ports/distfiles</filename>, you will have to
|
||||
get the distfile using another machine and copy it to
|
||||
<filename>/usr/ports/distfiles</filename> from a floppy or your
|
||||
DOS partition. Read <filename>Makefile</filename> (with <command>cat</command>
|
||||
or <command>more</command> or <command>view</command>) to find out where to go
|
||||
(the master distribution site) to get the file and what its name
|
||||
is. Its name will be truncated when downloaded to DOS, and
|
||||
after you get it into <filename>/usr/ports/distfiles</filename>
|
||||
you'll have to rename it (with the <command>mv</command> command) to
|
||||
its original name so it can be found. (Use binary file
|
||||
transfers!) Then go back to
|
||||
<filename>/usr/local/kermit</filename>, find the directory with
|
||||
<filename>Makefile</filename>, and type <command>make all
|
||||
install</command>.</para>
|
||||
DOS partition. Read <filename>Makefile</filename> (with
|
||||
<command>cat</command> or <command>more</command> or
|
||||
<command>view</command>) to find out where to go (the master
|
||||
distribution site) to get the file and what its name is. Its
|
||||
name will be truncated when downloaded to DOS, and after you get
|
||||
it into <filename>/usr/ports/distfiles</filename> you'll have to
|
||||
rename it (with the <command>mv</command> command) to its
|
||||
original name so it can be found. (Use binary file transfers!)
|
||||
Then go back to <filename>/usr/local/kermit</filename>, find the
|
||||
directory with <filename>Makefile</filename>, and type
|
||||
<command>make all install</command>.</para>
|
||||
|
||||
<para>The other thing that happens when installing ports or
|
||||
packages is that some other program is needed. If the
|
||||
|
@ -859,37 +868,39 @@
|
|||
unzip</errorname> or whatever, you might need to install the
|
||||
package or port for unzip before you continue.</para>
|
||||
|
||||
<para>Once it's installed type <command>rehash</command> to make FreeBSD
|
||||
reread the files in the path so it knows what's there. (If you
|
||||
get a lot of <errorname>path not found</errorname> messages when you use
|
||||
<command>whereis</command> or which, you might want to make additions
|
||||
to the list of directories in the path statement in
|
||||
<filename>.cshrc</filename> in your home directory. The path
|
||||
statement in Unix does the same kind of work it does in DOS,
|
||||
except the current directory is not (by default) in the path for
|
||||
security reasons; if the command you want is in the directory
|
||||
you're in, you need to type <filename>./</filename> before the
|
||||
command to make it work; no space after the slash.)</para>
|
||||
<para>Once it's installed type <command>rehash</command> to make
|
||||
FreeBSD reread the files in the path so it knows what's there.
|
||||
(If you get a lot of <errorname>path not found</errorname>
|
||||
messages when you use <command>whereis</command> or which, you
|
||||
might want to make additions to the list of directories in the
|
||||
path statement in <filename>.cshrc</filename> in your home
|
||||
directory. The path statement in Unix does the same kind of
|
||||
work it does in DOS, except the current directory is not (by
|
||||
default) in the path for security reasons; if the command you
|
||||
want is in the directory you're in, you need to type
|
||||
<filename>./</filename> before the command to make it work; no
|
||||
space after the slash.)</para>
|
||||
|
||||
<para>You might want to get the most recent version of Netscape
|
||||
from their <ulink URL="ftp://ftp.netscape.com">FTP site</ulink>.
|
||||
(Netscape requires the X Window System.) There's now a FreeBSD
|
||||
version, so look around carefully. Just use <command>gunzip
|
||||
<replaceable>filename</replaceable></command> and <command>tar xvf
|
||||
<replaceable>filename</replaceable></command> on it, move the binary to
|
||||
<filename>/usr/local/bin</filename> or some other place binaries
|
||||
are kept, <command>rehash</command>, and then put the following lines
|
||||
in <filename>.cshrc</filename> in each user's home directory or
|
||||
(easier) in <filename>/etc/csh.cshrc</filename>, the
|
||||
system-wide <command>csh</command> start-up file:</para>
|
||||
<replaceable>filename</replaceable></command> and <command>tar
|
||||
xvf <replaceable>filename</replaceable></command> on it, move
|
||||
the binary to <filename>/usr/local/bin</filename> or some other
|
||||
place binaries are kept, <command>rehash</command>, and then put
|
||||
the following lines in <filename>.cshrc</filename> in each
|
||||
user's home directory or (easier) in
|
||||
<filename>/etc/csh.cshrc</filename>, the system-wide
|
||||
<command>csh</command> start-up file:</para>
|
||||
|
||||
<informalexample>
|
||||
<programlisting>setenv XKEYSYMDB /usr/X11R6/lib/X11/XKeysymDB
|
||||
setenv XNLSPATH /usr/X11R6/lib/X11/nls</programlisting>
|
||||
</informalexample>
|
||||
|
||||
<para>This assumes that the file <filename>XKeysymDB</filename> and the
|
||||
directory <filename>nls</filename> are in
|
||||
<para>This assumes that the file <filename>XKeysymDB</filename>
|
||||
and the directory <filename>nls</filename> are in
|
||||
<filename>/usr/X11R6/lib/X11</filename>; if they're not, find
|
||||
them and put them there.</para>
|
||||
|
||||
|
@ -913,17 +924,21 @@ setenv XNLSPATH /usr/X11R6/lib/X11/nls</programlisting>
|
|||
files: a series of commands to be run without your
|
||||
intervention.</para>
|
||||
|
||||
<para>Two shells come installed with FreeBSD: <command>csh</command> and <command>sh</command>. <command>csh</command> is
|
||||
good for command-line work, but scripts should be written with
|
||||
<command>sh</command> (or <command>bash</command>). You can find out what shell you have by typing
|
||||
<command>echo $SHELL</command>.</para>
|
||||
<para>Two shells come installed with FreeBSD:
|
||||
<command>csh</command> and <command>sh</command>.
|
||||
<command>csh</command> is good for command-line work, but
|
||||
scripts should be written with <command>sh</command> (or
|
||||
<command>bash</command>). You can find out what shell you have
|
||||
by typing <command>echo $SHELL</command>.</para>
|
||||
|
||||
<para>The <command>csh</command> shell is okay, but <command>tcsh</command> does everything <command>csh</command> does and
|
||||
more. It allows you to recall commands with the arrow keys
|
||||
and edit them. It has tab-key completion of filenames (<command>csh</command> uses
|
||||
the <keycap>Esc</keycap> key), and it lets you switch to the directory you
|
||||
were last in with <command>cd -</command>. It's also much
|
||||
easier to alter your prompt with <command>tcsh</command>. It makes life a lot
|
||||
<para>The <command>csh</command> shell is okay, but
|
||||
<command>tcsh</command> does everything <command>csh</command>
|
||||
does and more. It allows you to recall commands with the arrow
|
||||
keys and edit them. It has tab-key completion of filenames
|
||||
(<command>csh</command> uses the <keycap>Esc</keycap> key), and
|
||||
it lets you switch to the directory you were last in with
|
||||
<command>cd -</command>. It's also much easier to alter your
|
||||
prompt with <command>tcsh</command>. It makes life a lot
|
||||
easier.</para>
|
||||
|
||||
<para>Here are the three steps for installing a new shell:</para>
|
||||
|
@ -933,54 +948,56 @@ setenv XNLSPATH /usr/X11R6/lib/X11/nls</programlisting>
|
|||
<para>Install the shell as a port or a package, just as you
|
||||
would any other port or package. Use
|
||||
<command>rehash</command> and <command>which tcsh</command>
|
||||
(assuming you're installing <command>tcsh</command>) to make sure it got
|
||||
installed.</para>
|
||||
(assuming you're installing <command>tcsh</command>) to make
|
||||
sure it got installed.</para>
|
||||
</step>
|
||||
|
||||
<step>
|
||||
<para>As root, edit <filename>/etc/shells</filename>, adding a
|
||||
line in the file for the new shell, in this case
|
||||
<filename>/usr/local/bin/tcsh</filename>, and save the file. (Some ports may do
|
||||
this for you.)</para>
|
||||
<filename>/usr/local/bin/tcsh</filename>, and save the file.
|
||||
(Some ports may do this for you.)</para>
|
||||
</step>
|
||||
|
||||
<step>
|
||||
<para>Use the <command>chsh</command> command to change your
|
||||
shell to <command>tcsh</command> permanently, or type <command>tcsh</command>
|
||||
at the prompt to change your shell without logging in
|
||||
again.</para>
|
||||
shell to <command>tcsh</command> permanently, or type
|
||||
<command>tcsh</command> at the prompt to change your shell
|
||||
without logging in again.</para>
|
||||
</step>
|
||||
</procedure>
|
||||
|
||||
<note>
|
||||
<para>It can be dangerous to change root's shell to something
|
||||
other than <command>sh</command> or <command>csh</command> on early versions of FreeBSD and many
|
||||
other versions of Unix; you may not have a working shell when
|
||||
the system puts you into single user mode. The solution is to
|
||||
use <command>su -m</command> to become root, which will give
|
||||
you the <command>tcsh</command> as root, because the shell is part of the
|
||||
environment. You can make this permanent by adding it to your
|
||||
<filename>.tcshrc</filename> file as an alias with
|
||||
other than <command>sh</command> or <command>csh</command> on
|
||||
early versions of FreeBSD and many other versions of Unix; you
|
||||
may not have a working shell when the system puts you into
|
||||
single user mode. The solution is to use <command>su
|
||||
-m</command> to become root, which will give you the
|
||||
<command>tcsh</command> as root, because the shell is part of
|
||||
the environment. You can make this permanent by adding it to
|
||||
your <filename>.tcshrc</filename> file as an alias with
|
||||
<programlisting>alias su su -m.</programlisting></para>
|
||||
</note>
|
||||
|
||||
<para>When <command>tcsh</command> starts up, it will read the
|
||||
<filename>/etc/csh.cshrc</filename> and
|
||||
<filename>/etc/csh.login</filename> files, as does <command>csh</command>. It will
|
||||
also read the <filename>.login</filename> file in your home
|
||||
directory and the <filename>.cshrc</filename> file as well,
|
||||
unless you provide a <filename>.tcshrc</filename> file. This
|
||||
you can do by simply copying <filename>.cshrc</filename> to
|
||||
<filename>/etc/csh.login</filename> files, as does
|
||||
<command>csh</command>. It will also read the
|
||||
<filename>.login</filename> file in your home directory and the
|
||||
<filename>.cshrc</filename> file as well, unless you provide a
|
||||
<filename>.tcshrc</filename> file. This you can do by simply
|
||||
copying <filename>.cshrc</filename> to
|
||||
<filename>.tcshrc</filename>.</para>
|
||||
|
||||
<para>Now that you've installed <command>tcsh</command>, you can adjust your prompt.
|
||||
You can find the details in the manual page for <command>tcsh</command>, but here
|
||||
is a line to put in your <filename>.tcshrc</filename> that will
|
||||
tell you how many commands you have typed, what time it is, and
|
||||
what directory you are in. It also produces a
|
||||
<literal>></literal> if you're an ordinary user and a
|
||||
<literal>#</literal> if you're root, but tsch will do that in
|
||||
any case:</para>
|
||||
<para>Now that you've installed <command>tcsh</command>, you can
|
||||
adjust your prompt. You can find the details in the manual page
|
||||
for <command>tcsh</command>, but here is a line to put in your
|
||||
<filename>.tcshrc</filename> that will tell you how many
|
||||
commands you have typed, what time it is, and what directory you
|
||||
are in. It also produces a <literal>></literal> if you're an
|
||||
ordinary user and a <literal>#</literal> if you're root, but
|
||||
tsch will do that in any case:</para>
|
||||
|
||||
<para>set prompt = "%h %t %~ %# "</para>
|
||||
|
||||
|
@ -1004,12 +1021,12 @@ setenv XNLSPATH /usr/X11R6/lib/X11/nls</programlisting>
|
|||
<title>Other</title>
|
||||
|
||||
<para>As root, you can dismount the CDROM with
|
||||
<command>/sbin/umount /cdrom</command>, take it out of the drive,
|
||||
insert another one, and mount it with
|
||||
<command>/sbin/umount /cdrom</command>, take it out of the
|
||||
drive, insert another one, and mount it with
|
||||
<command>/sbin/mount_cd9660 /dev/cd0a /cdrom</command> assuming
|
||||
<hardware>cd0a</hardware> is the device name for your CDROM drive. The
|
||||
most recent versions of FreeBSD let you mount the CDROM with
|
||||
just <command>/sbin/mount /cdrom</command>.</para>
|
||||
<hardware>cd0a</hardware> is the device name for your CDROM
|
||||
drive. The most recent versions of FreeBSD let you mount the
|
||||
CDROM with just <command>/sbin/mount /cdrom</command>.</para>
|
||||
|
||||
<para>Using the live file system—the second of FreeBSD's
|
||||
CDROM disks—is useful if you've got limited space. What
|
||||
|
|
Loading…
Reference in a new issue