Korn Shell
Korn Shell


The Korn shell, written by David Korn, is newer than either the Bourne or c shell. Its syntax is similar to that of the Bourne shell, but its power for interactive users is similar to that of c shell plus it adds a number of important features including command line editing. See Summary of Shell Facilities.

Korn Shell Files
The default files for the Korn shell are .kshrc and .profile. The .profile is the same as for the Bourne shell .profile (see Bourne Shell for more information). Below is a short example of a .kshrc that could be used if the Korn shell is the default shell.


set -o noclobber	# Provides some protection
			#  from accidental file  deletion

set -o ignoreeof	# Don't log out on control-D
set -o emacs		# Use emacs style commands for
			#  command editing
stty echoe echoke

# Aliases

alias cp='/bin/cp -i'
alias mv='/bin/mv -i'
alias rm='/bin/rm -i'
alias ls='/bin/ls -F'
alias mail='/usr/bin/mailx'
vt100 () { TERM=vt100; export TERM; }

Korn Shell Commands

Korn shell commands are similar to Bourne shell commands. See Bourne Shell Commands.
For more information on the Korn shell try man ksh.