How To: Find Out KSH ( Korn Shell ) Version on Linux or Unix-like system

How do I check ksh version? How do I find out ksh version under UNIX like operating systems?

The original Korn shell version is known as ksh88. It is default on many UNIX like operating system including AIX 4. The ksh93 is an updated version. There are also modified versions of ksh93 which add new features. To get ksh version open a command-line terminal (select Applications > Accessories > Terminal), and then type the following command:

ksh --version


echo ${.sh.version}




Sample outputs:

Fig.01: UNIX Check ksh version command ouput

The above version indicates that I’m using the official ksh93t+ version. It was released on 2010-03-09. If above command failed try pressing ^V ( control + V ) OR ESC + ^V ( Escape followed by control + V ) to display version of the shell in Emacs mode.

How can I get the version of ksh?

Another option is to type the following command:

strings /bin/ksh | grep Version | tail -2

Sample outputs:

@(#)$Id: Version AJM 93u+ 2012-08-01 $

Shell script example to find out if I am using modern version of ksh

The sample script is as follows:

if whence -a whence > /dev/null; then
   echo "Good. You are using modern version of KSH."
  echo "Oh no. You are using an older version of KSH."
  1. KSH 93 man page
  2. KSH 88 man page
  3. Visit home Page for the KornShell to download latest ksh93 version for Linux / UNIX / Apple OS X / BSD operating systems.

Posted by: SXI ADMIN

The author is the creator of SXI LLC and a seasoned sysadmin, DevOps engineer, and a trainer for the Linux operating system/Unix shell scripting. Get the latest tutorials on SysAdmin, Linux/Unix and open source topics via RSS/XML feed or weekly email newsletter.

Leave a Reply

Your email address will not be published. Required fields are marked *

Previous Post

How to Make Website WCAG Compliant?

Next Post

Link download Kali Linux 2020.1 (ISO + Torrent)

Related Posts