Invoking The Korn Shell Separately
If you would like to use the Korn shell, but keep your login shell the same, you can avoid conflicts between the two shells by putting all of your Korn shell environment and startup commands in the environment file. This is specified by the ENV variable, which could be set in your Bourne shell .profile file like this:
$ grep ENV $HOME/.profile ENV=$HOME/.kshrc
or in the C shell .login file:
$ grep ENV $HOME/.login setenv ENV $HOME/.kshrc
This way, when you invoke the Korn shell, it will know where to look and find the environment settings. Here are some basic commands that should be in the environment file:
$ cat $HOME/.kshrc SHELL=/usr/local/bin/ksh EDITOR=vi export SHELL EDITOR
The EDITOR variable specifies ...
Get Korn Shell: Unix and Linux Programming Manual, Third Edition, The now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.