0

never touched Solaris before is there an easy command to see if Bash is installed?

Probably a silly question, thanks for your help

5 Answers 5

3

Maybe I'm oversimplifying this but have you tried typing "bash" at the command prompt?

4
  • Yes. Says not found, but does that mean it's not installed? Sep 29, 2014 at 9:44
  • It could be that it's not installed or could be that you've not got the path set, try /usr/bin/bash . Sep 29, 2014 at 9:48
  • Directory is not there, guessing it not installed Sep 29, 2014 at 9:52
  • And one final thing to try: pkginfo|grep -i bash Sep 29, 2014 at 9:53
2

To check if bash package is installed try this command (verified on Solaris 10):

pkginfo -l SUNWbash

It may be also installed from 3rd-party software repository, then, try:

pkginfo | grep -i bash
2
  • On Solaris 11 & later, instead run pkg info shell/bash.
    – alanc
    Sep 30, 2014 at 4:39
  • On Solaris 10 & before, you can use grep to look into /var/sadm/install/contents, that file lists all the files installed in packages. grep bin/bash /var/sadm/install/contents Oct 14, 2014 at 4:00
1

If bash is installed the follwing will state which version you have, otherwise thorw an error

/usr/bin/bash --version
0

Remember that can bash can also be compiled from the source by a regular user account and run from a home directory. Try find / -name '*bash*' or so.

0

The locate command simply searches a database of files on the system. My hack on my SUNOS uses the find command to create a text database and then just greps that datebase for future file hunts. Note that creating the text database (about 200 Mbytes) on my SUNOS takes a long time. The grep only takes a few seconds per search.

find / > ~/locate_db

grep bin/bash ~/locate_db

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .