AIX > Administration

What ksh shell (version) am I using?

(1/1)

Michael:
The default shell on AIX is /usr/bin/ksh, and it's version is, by definition ksh88 (POSIX norm).

Several other shell behaviors are emulated by this binary based on the program (argv[0]) name - via hard-links.


--- Code: ---root@x064:[/home/root]find /usr -inum 603 -xdev -ls
  603  289 -r-xr-xr-x  5 bin       bin         294926 Nov 29  2017 /usr/bin/ksh
  603  289 -r-xr-xr-x  5 bin       bin         294926 Nov 29  2017 /usr/bin/psh
  603  289 -r-xr-xr-x  5 bin       bin         294926 Nov 29  2017 /usr/bin/rksh
  603  289 -r-xr-xr-x  5 bin       bin         294926 Nov 29  2017 /usr/bin/sh
  603  289 -r-xr-xr-x  5 bin       bin         294926 Nov 29  2017 /usr/bin/tsh

--- End code ---

There is a second ksh version named ksh93.


--- Code: ---find /usr -inum 91 -xdev -ls
   91 2250 -r-xr-xr-x  2 bin       bin        2303098 Nov 14  2017 /usr/bin/ksh93
   91 2250 -r-xr-xr-x  2 bin       bin        2303098 Nov 14  2017 /usr/bin/rksh93

--- End code ---

This version supports additional options that ksh(88) does not.

I further recommend reading: https://en.wikipedia.org/wiki/KornShell - for history, and the AIX documentation (currently) at:

* https://www.ibm.com/support/knowledgecenter/en/ssw_aix_72/osmanagement/korn_shell.html
* https://www.ibm.com/support/knowledgecenter/en/ssw_aix_72/osmanagement/korn_shell_enhanced.html
* https://www.ibm.com/support/knowledgecenter/ssw_aix_72/k_commands/ksh.html
* https://www.ibm.com/support/knowledgecenter/ssw_aix_72/k_commands/ksh93.html
Finally, I also noticed this discussion on ksh and ksh93: https://unix.stackexchange.com/questions/199900/how-can-i-safely-get-the-version-of-ksh

Navigation

[0] Message Index

Go to full version