LinuxCommandLibrary

ksh

TLDR

Start Korn shell

$ ksh
copy
Run script
$ ksh [script.ksh]
copy
Run command
$ ksh -c "[command]"
copy
Login shell
$ ksh -l
copy
Restricted shell
$ ksh -r
copy
POSIX mode
$ ksh -o posix
copy

SYNOPSIS

ksh [options] [script] [args...]

DESCRIPTION

ksh is the Korn shell, combining features of sh and csh. It provides advanced scripting with interactive editing.
The shell supports command history, job control, and aliases. ksh93 is the most common version.
ksh is the Korn shell.

PARAMETERS

SCRIPT

Script file to execute.
-c CMD
Execute command string.
-l
Login shell.
-r
Restricted shell.
-o OPTION
Set shell option.
-i
Interactive shell.
--help
Display help information.

CAVEATS

Multiple implementations exist. Different from bash in subtle ways. POSIX compatible.

HISTORY

The Korn shell was created by David Korn at Bell Labs in the 1980s, influencing many modern shells.

SEE ALSO

bash(1), sh(1), zsh(1), tcsh(1)

Copied to clipboard