Add an entry on changing shells.
PR: 17862 Suggested by: Mike Kohout <mwkohout@hotmail.com> Submitted by: Eric Ogren <eogren@earthlink.net>
This commit is contained in:
parent
bb04c38477
commit
cc328eda1d
Notes:
svn2git
2020-12-08 03:00:23 +00:00
svn path=/head/; revision=7041
2 changed files with 80 additions and 2 deletions
|
|
@ -1,7 +1,7 @@
|
||||||
<!--
|
<!--
|
||||||
The FreeBSD Documentation Project
|
The FreeBSD Documentation Project
|
||||||
|
|
||||||
$FreeBSD: doc/en_US.ISO_8859-1/books/handbook/basics/chapter.sgml,v 1.15 2000/03/15 23:01:40 jim Exp $
|
$FreeBSD: doc/en_US.ISO_8859-1/books/handbook/basics/chapter.sgml,v 1.16 2000/04/06 20:28:27 jim Exp $
|
||||||
-->
|
-->
|
||||||
|
|
||||||
<chapter id="basics">
|
<chapter id="basics">
|
||||||
|
|
@ -331,6 +331,45 @@
|
||||||
$TERM</command> prints whatever your terminal is set to.
|
$TERM</command> prints whatever your terminal is set to.
|
||||||
<command>echo \$TERM</command> prints <envar>$TERM</envar> as
|
<command>echo \$TERM</command> prints <envar>$TERM</envar> as
|
||||||
is.</para>
|
is.</para>
|
||||||
|
|
||||||
|
<sect2 id="changing-shells">
|
||||||
|
<title>Changing your shell</title>
|
||||||
|
|
||||||
|
<para>The easiest way to change your shell is to use the
|
||||||
|
<command>chsh</command>. Running <command>chsh</command> will
|
||||||
|
place you into the editor that is in your <envar>EDITOR</envar>
|
||||||
|
environment variable; if it is not set, you will be placed in
|
||||||
|
<command>vi</command>. Change the “Shell:” line
|
||||||
|
accordingly.</para>
|
||||||
|
|
||||||
|
<para>You can also give <command>chsh</command> the
|
||||||
|
<option>-s</option> option; this will set the shell for you
|
||||||
|
without having to enter the editor. For example, if you wanted to
|
||||||
|
change your shell to bash, the following should do the
|
||||||
|
trick:</para>
|
||||||
|
|
||||||
|
<screen>&prompt.user; <userinput>chsh -s /usr/local/bin/bash</userinput></screen>
|
||||||
|
|
||||||
|
<para>Running <command>chsh</command> with no parameters and editing
|
||||||
|
the shell from there would work also.</para>
|
||||||
|
|
||||||
|
<note>
|
||||||
|
<para>The shell that you wish to use <emphasis>must</emphasis> be
|
||||||
|
present in the <filename>/etc/shells</filename> file. If you
|
||||||
|
have installed a shell from the <link linkend="ports">ports
|
||||||
|
collection</link>, then this should have been done for you
|
||||||
|
already. If you installed the shell by hand, you must do
|
||||||
|
this.</para>
|
||||||
|
|
||||||
|
<para>For example, if you installed <command>bash</command> by hand
|
||||||
|
and placed it into <filename>/usr/local/bin</filename>, you would
|
||||||
|
want to:</para>
|
||||||
|
|
||||||
|
<screen>&prompt.root; <userinput>echo "/usr/local/bin/bash" >> /etc/shells</userinput></screen>
|
||||||
|
|
||||||
|
<para>Then rerun <command>chsh</command>.</para>
|
||||||
|
</note>
|
||||||
|
</sect2>
|
||||||
</sect1>
|
</sect1>
|
||||||
|
|
||||||
<sect1 id="editors">
|
<sect1 id="editors">
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,7 @@
|
||||||
<!--
|
<!--
|
||||||
The FreeBSD Documentation Project
|
The FreeBSD Documentation Project
|
||||||
|
|
||||||
$FreeBSD: doc/en_US.ISO_8859-1/books/handbook/basics/chapter.sgml,v 1.15 2000/03/15 23:01:40 jim Exp $
|
$FreeBSD: doc/en_US.ISO_8859-1/books/handbook/basics/chapter.sgml,v 1.16 2000/04/06 20:28:27 jim Exp $
|
||||||
-->
|
-->
|
||||||
|
|
||||||
<chapter id="basics">
|
<chapter id="basics">
|
||||||
|
|
@ -331,6 +331,45 @@
|
||||||
$TERM</command> prints whatever your terminal is set to.
|
$TERM</command> prints whatever your terminal is set to.
|
||||||
<command>echo \$TERM</command> prints <envar>$TERM</envar> as
|
<command>echo \$TERM</command> prints <envar>$TERM</envar> as
|
||||||
is.</para>
|
is.</para>
|
||||||
|
|
||||||
|
<sect2 id="changing-shells">
|
||||||
|
<title>Changing your shell</title>
|
||||||
|
|
||||||
|
<para>The easiest way to change your shell is to use the
|
||||||
|
<command>chsh</command>. Running <command>chsh</command> will
|
||||||
|
place you into the editor that is in your <envar>EDITOR</envar>
|
||||||
|
environment variable; if it is not set, you will be placed in
|
||||||
|
<command>vi</command>. Change the “Shell:” line
|
||||||
|
accordingly.</para>
|
||||||
|
|
||||||
|
<para>You can also give <command>chsh</command> the
|
||||||
|
<option>-s</option> option; this will set the shell for you
|
||||||
|
without having to enter the editor. For example, if you wanted to
|
||||||
|
change your shell to bash, the following should do the
|
||||||
|
trick:</para>
|
||||||
|
|
||||||
|
<screen>&prompt.user; <userinput>chsh -s /usr/local/bin/bash</userinput></screen>
|
||||||
|
|
||||||
|
<para>Running <command>chsh</command> with no parameters and editing
|
||||||
|
the shell from there would work also.</para>
|
||||||
|
|
||||||
|
<note>
|
||||||
|
<para>The shell that you wish to use <emphasis>must</emphasis> be
|
||||||
|
present in the <filename>/etc/shells</filename> file. If you
|
||||||
|
have installed a shell from the <link linkend="ports">ports
|
||||||
|
collection</link>, then this should have been done for you
|
||||||
|
already. If you installed the shell by hand, you must do
|
||||||
|
this.</para>
|
||||||
|
|
||||||
|
<para>For example, if you installed <command>bash</command> by hand
|
||||||
|
and placed it into <filename>/usr/local/bin</filename>, you would
|
||||||
|
want to:</para>
|
||||||
|
|
||||||
|
<screen>&prompt.root; <userinput>echo "/usr/local/bin/bash" >> /etc/shells</userinput></screen>
|
||||||
|
|
||||||
|
<para>Then rerun <command>chsh</command>.</para>
|
||||||
|
</note>
|
||||||
|
</sect2>
|
||||||
</sect1>
|
</sect1>
|
||||||
|
|
||||||
<sect1 id="editors">
|
<sect1 id="editors">
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue