1

In SunOS 5.10, I could not get bash autocompletion (when TAB is pressed) to work. Arrow keys do not go through history either. Also, even though PS1 is set to \u@\h:\w\$, on command prompt it shows u@h:w$. Any ideas how can I fix it?

This is the result of pkginfo -l SUNWbash command:

   PKGINST:  SUNWbash
   NAME:  GNU Bourne-Again shell (bash)
   CATEGORY:  system
   ARCH:  i386
   VERSION:  11.10.0,REV=2005.01.08.01.09
   BASEDIR:  /
   VENDOR:  Sun Microsystems, Inc.
   DESC:  GNU Bourne-Again shell (bash) version 3.0
   PSTAMP:  sfw10-patch-x20070430084427
   INSTDATE:  Aug 28 2012 15:01
   HOTLINE:  Please contact your local service provider
   STATUS:  completely installed
   FILES:        3 installed pathnames
               2 shared pathnames
               2 directories
               1 executables
            1194 blocks used (approx)

BTW I am connecting through ssh from Max OSX.

And I can't even learn the version of bash:bash --version command creates a subshell.

  • The default shell the plain old Bourne Shell, not Bourne Again Shell ie. bash, I think. See Oracle documentation about Solaris shells. – Sami Laine Oct 6 '16 at 14:15
  • The default shell is actually bash: echo $SHELL returns /bin/bash. – gonda Oct 6 '16 at 15:07
  • What is the output of echo $BASH_VERSION ? – Gilles Oct 9 '16 at 23:45
  • Can you run shopt|grep compat just to make sure you're really running bash? It should output at least one compat line. – Mark Plotnick Oct 13 '16 at 17:07
3

In Solaris 10 plain-old Bourne Shell was still the default shell, not Bash. This changed in 2011 with the release of Solaris 11.

For Solaris 10 and supposing your user is 'john', then do as follows.

  1. Change to root: su - root
  2. Execute : usermod -s /usr/bin/bash john.

You'll need to logout from 'john' completely and login again.

  • Unfortunately, I don't have root access. I tried to run /usr/bin/bash, but it is still the same. It looks like tcsh has some kind of auto-completition. – gonda Oct 6 '16 at 15:05
0

To restore autocompletion and history navigation with arrow keys (without changing your interactive shell like peterh suggested although that is totally alright), try the following command:

$ set -o emacs

If that does not work, try :

$ export EDITOR=emacs

Copy whatever command works for you in you ~/.profile and this should be set automatically whenever you open a terminal.

0

This fixed my Solaris 10:

tcsh
set autolist

TAB should work from there on in your terminal.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.