Add more precise markup :
- man page entities - <command> - <username> - <groupname> etc.. PR: docs/30657 Submitted by: Giorgos Keramidas <charon@labs.gr>
This commit is contained in:
parent
acc30cb490
commit
71152126bb
Notes:
svn2git
2020-12-08 03:00:23 +00:00
svn path=/head/; revision=10804
1 changed files with 36 additions and 32 deletions
|
@ -1,7 +1,11 @@
|
|||
<!-- $FreeBSD: doc/en_US.ISO8859-1/articles/new-users/article.sgml,v 1.24 2001/09/11 11:26:41 dd Exp $ -->
|
||||
<!-- $FreeBSD: doc/en_US.ISO8859-1/articles/new-users/article.sgml,v 1.25 2001/09/17 01:29:35 murray Exp $ -->
|
||||
<!-- The FreeBSD Documentation Project -->
|
||||
|
||||
<!DOCTYPE ARTICLE PUBLIC "-//FreeBSD//DTD DocBook V4.1-Based Extension//EN">
|
||||
<!DOCTYPE ARTICLE PUBLIC "-//FreeBSD//DTD DocBook V4.1-Based Extension//EN" [
|
||||
<!ENTITY % man PUBLIC "-//FreeBSD//ENTITIES DocBook Manual Page Entities//EN">
|
||||
%man;
|
||||
]>
|
||||
|
||||
<article>
|
||||
<articleinfo>
|
||||
<title>For People New to Both FreeBSD and Unix</title>
|
||||
|
@ -93,23 +97,23 @@
|
|||
</informalexample>
|
||||
|
||||
<para>The first time you use adduser, it might ask for some
|
||||
defaults to save. You might want to make the default shell csh
|
||||
instead of sh, if it suggests sh as the default. Otherwise just
|
||||
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 <emphasis>jack</emphasis> with
|
||||
<para>Suppose you create a user <username>jack</username> with
|
||||
full name <emphasis>Jack Benimble</emphasis>. Give jack a
|
||||
password if security (even kids around who might pound on the
|
||||
keyboard) is an issue. When it asks you if you want to invite
|
||||
jack into other groups, type <userinput>wheel</userinput></para>
|
||||
jack into other groups, type <groupname>wheel</groupname></para>
|
||||
|
||||
<informalexample>
|
||||
<screen>Login group is ``jack''. Invite jack into other groups: <userinput>wheel</userinput></screen>
|
||||
</informalexample>
|
||||
|
||||
<para>This will make it possible to log in as
|
||||
<emphasis>jack</emphasis> and use the <command>su</command>
|
||||
<username>jack</username> and use the &man.su.1;
|
||||
command to become root. Then you won't get scolded any more for
|
||||
logging in as root.</para>
|
||||
|
||||
|
@ -122,7 +126,7 @@
|
|||
wrong.</para>
|
||||
|
||||
<para>Once you've done this, use <command>exit</command> to get
|
||||
back to a login prompt and log in as <emphasis>jack</emphasis>.
|
||||
back to a login prompt and log in as <username>jack</username>.
|
||||
In general, it's a good idea to do as much work as possible as
|
||||
an ordinary user who doesn't have the power—and
|
||||
risk—of root.</para>
|
||||
|
@ -130,9 +134,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 wheel). But first you need to
|
||||
practice <command>vi</command>, the text editor—or use the
|
||||
simpler text editor, <command>ee</command>, 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>
|
||||
|
@ -259,7 +263,7 @@
|
|||
convenient). You can create other aliases by editing
|
||||
<filename>.cshrc</filename>. You can make these aliases
|
||||
available to all users on the system by putting them in the
|
||||
system-wide csh configuration file,
|
||||
system-wide <command>csh</command> configuration file,
|
||||
<filename>/etc/csh.cshrc</filename>.</para>
|
||||
</sect1>
|
||||
|
||||
|
@ -293,11 +297,11 @@
|
|||
<command>man <parameter>ls</parameter></command> will tell
|
||||
you all the ways to use the <command>ls</command> command.
|
||||
Press <keycap>Enter</keycap> to move through text,
|
||||
<keycombo><keycap>Ctrl</keycap><keycap>b</keycap></keycombo>
|
||||
<keycombo><keycap>Ctrl</keycap><keycap>B</keycap></keycombo>
|
||||
to go back a page,
|
||||
<keycombo><keycap>Ctrl</keycap><keycap>f</keycap></keycombo>
|
||||
<keycombo><keycap>Ctrl</keycap><keycap>F</keycap></keycombo>
|
||||
to go forward, <keycap>q</keycap> or
|
||||
<keycombo><keycap>Ctrl</keycap><keycap>c</keycap></keycombo>
|
||||
<keycombo><keycap>Ctrl</keycap><keycap>C</keycap></keycombo>
|
||||
to quit.</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
|
@ -360,7 +364,7 @@
|
|||
<literal>w</literal>.</para>
|
||||
|
||||
<para>Are some of these not working very well? Both
|
||||
<command>locate</command> and <command>whatis</command> depend
|
||||
&man.locate.1; and &man.whatis.1; depend
|
||||
on a database that's rebuilt weekly. If your machine isn't
|
||||
going to be left on over the weekend (and running FreeBSD), you
|
||||
might want to run the commands for daily, weekly, and monthly
|
||||
|
@ -877,7 +881,7 @@
|
|||
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 csh start-up file:</para>
|
||||
system-wide <command>csh</command> start-up file:</para>
|
||||
|
||||
<informalexample>
|
||||
<programlisting>setenv XKEYSYMDB /usr/X11R6/lib/X11/XKeysymDB
|
||||
|
@ -909,17 +913,17 @@ 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: csh and sh. csh is
|
||||
<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
|
||||
sh (or bash). You can find out what shell you have by typing
|
||||
<command>sh</command> (or <command>bash</command>). You can find out what shell you have by typing
|
||||
<command>echo $SHELL</command>.</para>
|
||||
|
||||
<para>The csh shell is okay, but tcsh does everything csh does and
|
||||
<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 (csh uses
|
||||
the escape key), and it lets you switch to the directory you
|
||||
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 tcsh. It makes life a lot
|
||||
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>
|
||||
|
@ -929,20 +933,20 @@ 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 tcsh) to make sure it got
|
||||
(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
|
||||
/usr/local/bin/tcsh, and save the file. (Some ports may do
|
||||
<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 tcsh permanently, or type <command>tcsh</command>
|
||||
shell to <command>tcsh</command> permanently, or type <command>tcsh</command>
|
||||
at the prompt to change your shell without logging in
|
||||
again.</para>
|
||||
</step>
|
||||
|
@ -950,27 +954,27 @@ setenv XNLSPATH /usr/X11R6/lib/X11/nls</programlisting>
|
|||
|
||||
<note>
|
||||
<para>It can be dangerous to change root's shell to something
|
||||
other than sh or csh on early versions of FreeBSD and many
|
||||
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 tcsh as root, because the shell is part of the
|
||||
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 tcsh starts up, it will read the
|
||||
<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 csh. It will
|
||||
<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 tcsh, you can adjust your prompt.
|
||||
You can find the details in the manual page for tcsh, but here
|
||||
<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
|
||||
|
|
Loading…
Reference in a new issue