Issues with ksh

We are using ksh on Linux (Thats what architect told me).
1) When I am using up and down arrow key, I can not navigate to previous and next commands. How can I navigate commands in ksh ? Someone told me that I need to have bash shell installed ? Can I have bash shell installed on ksh ? OR can I have both ksh and bash shell installed ? How can I switch between shells , if I have more than 1 shells installed ?

2) I was running some command and it stopped giving me command line. Whatever key I press, it will literally be typed on line. Q, Esc, ctrl+q nothing would work to abort. If I want to abort some command OR quit a command, how can I do that ?

3) Why are there so many shells in Linux environment ? Is there an advantage of using one over the other ? Whats the advantage of using ksh over bash shell ?

4) Are thgere any updates coming to these shells like ones for browsers and OS ? If yes, how can we find that out ?

Thanks

1) When I am using up and down arrow key, I can not navigate to previous and next commands. How can I navigate commands in ksh ? Someone told me that I need to have bash shell installed ? Can I have bash shell installed on ksh ? OR can I have both ksh and bash shell installed ? How can I switch between shells , if I have more than 1 shells installed ?

That functionality is available in newer versions (takes some tweaking though) of ksh (i.e. ksh93). If you're more comfortable using that functionality then switch to bash. Both shells are usually available on the average Linux system.
If you want to see what shell you're currently using run this command:
ps -p $$ | awk 'END{print $NF}'

If you want to switch between shells, use the chsh command (if available):
chsh -s $(which <shell name here>)

Afterwards you would need to logout and log back in to enable the new shell.

2) I was running some command and it stopped giving me command line. Whatever key I press, it will literally be typed on line. Q, Esc, ctrl+q nothing would work to abort. If I want to abort some command OR quit a command, how can I do that ?

I didn't see CTRL-C listed. If that doesn't work, try CTRL-Z to pause\stop the process (should return you to the shell). Then run jobs -l to list it and then feed the PID to the kill command.

3) Why are there so many shells in Linux environment ? Is there an advantage of using one over the other ? Whats the advantage of using ksh over bash shell ?

Nothing wrong with a wide selection. Everyone has different needs and/or uses and most shells are very unique unto themselves. I personally like both, but bash has the advantage of being easier, especially for those new to Unix\Linux.

4) Are thgere any updates coming to these shells like ones for browsers and OS ? If yes, how can we find that out ?

Google the shells and visit their websites. They should list their software release cycle.

Ok, my lunch break is over. Hope I answered your questions. :slight_smile:

You can find out which shells you have installed by running the following command:

gacanepa@debian:~$ cat /etc/shells
# /etc/shells: valid login shells
/bin/csh
/bin/sh
/usr/bin/es
/usr/bin/ksh
/bin/ksh
/usr/bin/rc
/usr/bin/tcsh
/bin/tcsh
/usr/bin/esh
/bin/dash
/bin/bash
/bin/rbash
gacanepa@debian:~$

You can display your current shell by echoing the SHELL environment variable:

gacanepa@debian:~$ echo $SHELL
/bin/bash
gacanepa@debian:~$

Hope it helps.

In addition to what in2nix4life has already said, here are a few additional comments:
Why do I prefer ksh over bash?: Recent versions of the Korn shell can perform floating point calculations directly in the shell in addition to integer calculations (bash does not). The Korn shell frequently runs shell scripts faster than bash. I've been using it for more than 30 years and it "feels" natural to me. And, I personally know Dr. David Korn.

All versions of the Korn shell support command history, but the default mode may be different for bash than it is for ksh. The Korn shell defaults to vi mode command line editing; I think bash defaults to emacs mode. If you want ksh to use emacs mode, issue the command:

set -o emacs

after you start ksh (or do it in one of your shell's startup initialization files).

Note that many systems have more than one version of an emacs-like editor. Your shell may offer other choices. (On Mac OS X, ksh provides vi, emacs, and gmacs editing modes.)