old-www/HOWTO/VMS-to-Linux-HOWTO/configuring.html

299 lines
4.4 KiB
HTML

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML
><HEAD
><TITLE
>Configuring </TITLE
><META
NAME="GENERATOR"
CONTENT="Modular DocBook HTML Stylesheet Version 1.7"><LINK
REL="HOME"
TITLE="From VMS to Linux HOWTO"
HREF="index.html"><LINK
REL="PREVIOUS"
TITLE="Advanced Topics "
HREF="advanced-topics.html"><LINK
REL="NEXT"
TITLE="Useful Programs "
HREF="useful-programs.html"></HEAD
><BODY
CLASS="SECT1"
BGCOLOR="#FFFFFF"
TEXT="#000000"
LINK="#0000FF"
VLINK="#840084"
ALINK="#0000FF"
><DIV
CLASS="NAVHEADER"
><TABLE
SUMMARY="Header navigation table"
WIDTH="100%"
BORDER="0"
CELLPADDING="0"
CELLSPACING="0"
><TR
><TH
COLSPAN="3"
ALIGN="center"
>From VMS to Linux HOWTO</TH
></TR
><TR
><TD
WIDTH="10%"
ALIGN="left"
VALIGN="bottom"
><A
HREF="advanced-topics.html"
ACCESSKEY="P"
>Prev</A
></TD
><TD
WIDTH="80%"
ALIGN="center"
VALIGN="bottom"
></TD
><TD
WIDTH="10%"
ALIGN="right"
VALIGN="bottom"
><A
HREF="useful-programs.html"
ACCESSKEY="N"
>Next</A
></TD
></TR
></TABLE
><HR
ALIGN="LEFT"
WIDTH="100%"></DIV
><DIV
CLASS="SECT1"
><H1
CLASS="SECT1"
><A
NAME="CONFIGURING"
></A
>9. Configuring</H1
><P
>Your sysadm has already provided you with a number of configuration files
like <TT
CLASS="LITERAL"
>.xinitrc</TT
>, <TT
CLASS="LITERAL"
>.bash_profile</TT
>, <TT
CLASS="LITERAL"
>.inputrc</TT
>, and many others. The
ones you may want to edit are:</P
><P
>&#13;<P
></P
><UL
><LI
><P
> <TT
CLASS="LITERAL"
> .bash_profile</TT
> or <TT
CLASS="LITERAL"
>.profile</TT
>: read by the shell at login
time. It's like <TT
CLASS="LITERAL"
>LOGIN.COM</TT
>;&#13;</P
></LI
><LI
><P
> <TT
CLASS="LITERAL"
> .bash_logout</TT
>: read by the shell at logout. It's like
<TT
CLASS="LITERAL"
>LOGOUT.COM</TT
>;&#13;</P
></LI
><LI
><P
> <TT
CLASS="LITERAL"
> .bashrc</TT
>: read by non--login shells.&#13;</P
></LI
><LI
><P
> <TT
CLASS="LITERAL"
> .inputrc</TT
>: this file customises the key bindings and the
behaviour of the shell.&#13;</P
></LI
></UL
>&#13;</P
><P
>To give you an example, I'll include my <TT
CLASS="LITERAL"
>.bash_profile</TT
> (abridged):</P
><P
>&#13;<TABLE
BORDER="0"
BGCOLOR="#E0E0E0"
WIDTH="100%"
><TR
><TD
><FONT
COLOR="#000000"
><PRE
CLASS="PROGRAMLISTING"
># $HOME/.bash_profile
# don't redefine the path if not necessary
echo $PATH | grep $LOGNAME &#62; /dev/null
if [ $? != 0 ]
then
export PATH="$PATH:/home/$LOGNAME/bin" # add my dir to the PATH
fi
export PS1='LOGNAME:\w\$ '
export PS2='Continued...&#62;'
# aliases
alias bin="cd ~/bin" ; alias cp="cp -i" ; alias d="dir"
alias del="delete" ; alias dir="/bin/ls $LS_OPTIONS --format=vertical"
alias ed="jed" ; alias mv='mv -i'
alias u="cd .." ; alias undel="undelete"
# A few useful functions
inst() # Install a .tar.gz archive in current directory.
{
gzip -dc $1 | tar xvf -
}
cz() # List the contents of a .zip archive.
{
unzip -l $*
}
ctgz() # List the contents of a .tar.gz archive.
{
for file in $* ; do
gzip -dc ${file} | tar tf -
done
}
tgz() # Create a .tgz archive a la zip.
{
name=$1 ; tar -cvf $1 ; shift
tar -rf ${name} $* ; gzip -S .tgz ${name}
}</PRE
></FONT
></TD
></TR
></TABLE
>&#13;</P
><P
>And this is my <TT
CLASS="LITERAL"
>.inputrc</TT
>:</P
><P
>&#13;<TABLE
BORDER="0"
BGCOLOR="#E0E0E0"
WIDTH="100%"
><TR
><TD
><FONT
COLOR="#000000"
><PRE
CLASS="PROGRAMLISTING"
># $HOME/.inputrc
# Last modified: 16 January 1997.
#
# This file is read by bash and defines key bindings to be used by the shell;
# what follows fixes the keys END, HOME, and DELETE, plus accented letters.
# For more information, man readline.
"\e[1~": beginning-of-line
"\e[3~": delete-char
"\e[4~": end-of-line
set bell-style visible
set meta-flag On
set convert-meta Off
set output-meta On
set horizontal-scroll-mode On
set show-all-if-ambiguous On
# (F1 .. F5) are "\e[[A" ... "\e[[E"
"\e[[A": "info "</PRE
></FONT
></TD
></TR
></TABLE
>&#13;</P
></DIV
><DIV
CLASS="NAVFOOTER"
><HR
ALIGN="LEFT"
WIDTH="100%"><TABLE
SUMMARY="Footer navigation table"
WIDTH="100%"
BORDER="0"
CELLPADDING="0"
CELLSPACING="0"
><TR
><TD
WIDTH="33%"
ALIGN="left"
VALIGN="top"
><A
HREF="advanced-topics.html"
ACCESSKEY="P"
>Prev</A
></TD
><TD
WIDTH="34%"
ALIGN="center"
VALIGN="top"
><A
HREF="index.html"
ACCESSKEY="H"
>Home</A
></TD
><TD
WIDTH="33%"
ALIGN="right"
VALIGN="top"
><A
HREF="useful-programs.html"
ACCESSKEY="N"
>Next</A
></TD
></TR
><TR
><TD
WIDTH="33%"
ALIGN="left"
VALIGN="top"
>Advanced Topics</TD
><TD
WIDTH="34%"
ALIGN="center"
VALIGN="top"
>&nbsp;</TD
><TD
WIDTH="33%"
ALIGN="right"
VALIGN="top"
>Useful Programs</TD
></TR
></TABLE
></DIV
></BODY
></HTML
>