tags:

views:

970

answers:

7

When working on a linx CShell u get the option to press the up / down arrows to select the last command/s typed or the Command Buffer. This even works on Windows.

However this is not functional when working on Solaris, to which i recently switched. I am guessing that the shell is also a CShell.

Please tell me what key combination is required to have this feature on Solaris ?

A: 

It may be that it's the Korn shell in which case try <ESC>k. bash at least will allow you to switch modes with "set -o vi" or "set -o emacs".

paxdiablo
+2  A: 

The default shell in Solaris has command history, but you can also use Bash instead, it's more user friendly. Just type 'bash' (no quotes) at the command line. You can also edit /etc/passwd to make bash your default shell.

sk
A: 

Maybe you can use the !! command, to repeat the previous one.

CMS
A: 

Use "echo $SHELL" to see what your login shell is. If it's ksh or bash, try "set -o emacs". If that works, you'll be able to use ^P to go back a command. ^R lets you search for a command, ^F and ^B to move around within the command.

Kimbo
+2  A: 

The "official" default shell for Solaris is actually sh, the original Bourne shell (see Chapter 10 of the Advanced User Guide for Solaris for more info). If you'd like to change it to csh or tcsh—and you're not root (it's generally considered bad practice to use anything but sh as root's default)—just issue passwd -e /path/to/shell_of_your_choice <loginname>. I'm guessing this would probably look like passwd -e /bin/csh <loginname>, but you'd probably want to make sure it exists, first.

Hank Gay
A: 

thanx all for the answers. Sorry for the delay. I will look into them as soon as time permits.

A: 

If you can´t change your default shell, or you just want to try out one that works, you can kick off any other shell from your command line. I recommend you tcsh, which will have good command line editing and history using the arrow keys. Type /bin/tcsh at your prompt to try it out. You can use the earlier responses to change your default shell if you like tcsh. Make sure your have the following in your $HOME/.cshrc file:

set filec set history=1000 # or some other large number set autologout=0 # if you are logging in remotely under your account.

I hope this helps.

tpgould