Hi All,
I have installed cygwin64 terminal. I would like to have ksh shell as well. But i dont find any ksh files in /bin dir of cygwin. Pl. help on how to install ksh in cygwin. Its for my training purpose.I am using windows 7 64 bit .
Hi All,
I have installed cygwin64 terminal. I would like to have ksh shell as well. But i dont find any ksh files in /bin dir of cygwin. Pl. help on how to install ksh in cygwin. Its for my training purpose.I am using windows 7 64 bit .
The default shell in brand new cygwin is dash
. That is what you have unless you've changed it to bash. Because: The newest version of Korn shell is not in the public domain. You cannot download it legally, AFAIK. dash
is pretty close to ksh
and I believe it is POSIX
compliant. There are other available shells like this. Many have extensions you may or may not want. One match is pdksh
- public domain version of ksh. The cygwin site has pdksh
.
To make pdksh
or dash
invoke just like ksh
create a symlink. Example: /bin/ksh -> /usr/bin/pdksh
See: Almquist shell - Wikipedia - go to the DASH section.
I had the same issue/question awhile back...
After a bit of digging, I installed mksh which "links/hides" itself as ksh:
$ which ksh
/usr/bin/ksh
$ ls -lrt /usr/bin/ksh
lrwxrwxrwx 1 LP-VGERSHKO-W7+vg_local LP-VGERSHKO-W7+None 8 Apr 19 2018 /usr/bin/ksh -> mksh.exe
man mksh
yields:
MKSH(1) BSD General Commands Manual MKSH(1)
NAME
mksh, sh - MirBSD Korn shell
SYNOPSIS
mksh [-+abCefhiklmnprUuvXx] [-T [!]tty | -] [-+o option] [-c string | -s
| file [argument ...]]
builtin-name [argument ...]
DESCRIPTION
mksh is a command interpreter intended for both interactive and shell
script use. Its command language is a superset of the sh(C) shell lan�
guage and largely compatible to the original Korn shell. At times, this
manual page may give scripting advice; while it sometimes does take por�
table shell scripting or various standards into account all information
is first and foremost presented with mksh in mind and should be taken as
such.
I don't quite remember if mksh
was a separate Cygwin package or not...
When did the default shell become 'dash'?
I have searched the official CygWin site and can find nothing on it.