Logging In
A number of things happen before you see the
login
: prompt on your terminal. After you enter the login
name
, the
login
program is started. It finishes the process of logging you in by prompting for a password, checking the
/etc/passwd
file, and finally starting up your login shell. Your login shell is specified in the
/etc/passwd
file like this:
larissa:*:101:12::/home/larissa:/bin/sh
renata:*:102:101::/home/renata:/bin/ksh
For
larissa
, the login shell is
/bin/sh
, while for
renata
it is
/bin/ksh
.
Changing the Login Shell
To make the Korn shell your default login shell, have your system administrator change it to
/bin/ksh
or the pathname of wherever the Korn shell binary is located, or run the
chsh
command (if available on your system). Until that is done, you can still run the Korn shell by simply invoking:
$ ksh
This will give you a Korn subshell. To get back to your login shell, type
Ctl-d
(
Control-d
). If you get an error message complaining about ksh not being found, you can try to find it by executing:
$ find / name ksh print
/usr/local/bin/ksh
Once you've found it, add the directory in which it was found to your
PATH
variable. If you're using the Bourne shell, it would be done like this:
$ PATH=$PATH:/usr/local/bin
$ export PATH
$ ksh
while for the C shell:
% set path=($path /usr/local/bin)
% ksh
You could also invoke the Korn shell with the full pathname:
$ /usr/local/bin/ksh
More about the
PATH
variable is explained later in Chapter 7.
|