0

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

Probably a silly question, thanks for your help

user3329963
  • 163
  • 1
  • 3
  • 9

5 Answers5

3

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

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
dsmsk80
  • 5,757
  • 17
  • 22
  • On Solaris 11 & later, instead run `pkg info shell/bash`. – alanc Sep 30 '14 at 04: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` – Laszlo Valko Oct 14 '14 at 04:00
1

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

/usr/bin/bash --version
Dr.Avalanche
  • 133
  • 1
  • 1
  • 13
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.

Janne Pikkarainen
  • 31,454
  • 4
  • 56
  • 78
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