1833187 Members
2439 Online
110051 Solutions
New Discussion

bash not working

 
SOLVED
Go to solution
himacs
Super Advisor

bash not working

Hi Admins,

I have installed bash utility in B.11.23 server,which is downloaded from below link.

http://hpux.connect.org.uk/hppd/hpux/Shells/bash-4.0.033/

But when i type bash in the prompt, throws message as bash not found.Any settings needs to be done post installation to work with bash..

Please suggest on this..

Regards
Pavan

12 REPLIES 12
Michael Steele_2
Honored Contributor
Solution

Re: bash not working

HI

1) "...NOTE: bash requires the gettext, libiconv and termcap packages to be installed
first...."

2) gmake check?

3) ll /sbin/bash - ll /usb/bin/bask - /usr/local/bin/bash (* find bash *)
Support Fatherhood - Stop Family Law
James R. Ferguson
Acclaimed Contributor

Re: bash not working

Hi Pavan:

Packages from the HP-UX Porting Centre are installed in '/usr/local' --- in this case, '/usr/local/bin'. Normally this isn't part of your PATH. Either add '/usr/local/bin' to your PATH or use '/usr/local/bin/bash' to invoke the shell.

Of course, if you are modifying the default shell for a user, specify the absolute path. And, never, change 'root's default shell (as defined in '/etc/passwd') from anything other than '/sbin/sh'. Changing root's default shell can lead to an un-bootable (start-able) server.

Regards!

...JRF...
Steven Schweda
Honored Contributor

Re: bash not working

For info on where the shell looks for
commands, try
man

Look for PATH.

To save everyone much time on questions like
this, try
man
Nido
Trusted Contributor

Re: bash not working

Hello Pavan,

>>>bash not found
Type your name 'Pavan' and system will throw-out message 'Pavan: not found' except you've got an executable calles 'Pavan' on the PATH.

As suggested, If you have installed bash and all its dependencies, you should get bash.By default bash should be installed under /usr/local.

Cheers!!
" Let Villagers Be Happy!! "
himacs
Super Advisor

Re: bash not working

Hi All,

Sorry for delayed response.I have to install all the dependencies to bash work.Let me install the same first,i will update u status.

And i agree that i asked silly Q without trying with full path /usr/local/bin/bash. :)


Regards
himacs
himacs
Super Advisor

Re: bash not working

Hi All,

I have installed run time dependencies and now bash works fine.But problem is that i have to give full path /usr/local/bin/bash to invoke bash.Is there any way to invoke bash by just typing bash..


Regards
himacs
Horia Chirculescu
Honored Contributor

Re: bash not working

Yes,

You must add the string: /usr/local/bin/bash
to your PATH variable.

Check /etc/profile.

Best regards
Horia.
Best regards from Romania,
Horia.
Dennis Handly
Acclaimed Contributor

Re: bash not working

>Is there any way to invoke bash by just typing bash?

This is elementary shells 101. You will need to add the path of bash to PATH:
PATH=$PATH:/usr/local/bin
himacs
Super Advisor

Re: bash not working

Hi ,

I have added the /usr/local/bin in /etc/profile.But its not applicable to all the users.but when i added the same in users .profile under home directory ,its worked for that particular user.

Then how to enable the bash to all the user..?
It was my understanding that /etc/profile is applicable to all the user.

Regards\
himacs
Horia Chirculescu
Honored Contributor

Re: bash not working

>It was my understanding that /etc/profile is applicable to all the user.

You are correct. /etc/profile is for all the users. But this is only sourced when some user log into the system.

If someone does not want to logoff then login back, can issue a

source /etc/profile

Best regards
Horia.
Best regards from Romania,
Horia.
Steven Schweda
Honored Contributor

Re: bash not working

> You must add the string: /usr/local/bin/bash
> to your PATH variable.

No.

> [...] You will need to add the path of bash
> to PATH:
> PATH=$PATH:/usr/local/bin

Yes.

> This is elementary shells 101. [...]

Yes. Has anyone yet suggested this?:

man

If not, then let me suggest:

man

If that fails, then there are whole books
written to provide an introduction to UNIX
(-like) systems.

> It was my understanding that /etc/profile
> is applicable to all the user.

And what, exactly, did you do which caused
you to doubt it? A useful problem
description often includes a transcript
showing the actual commands used, and the
actual output from those commands. Saying
only that something "does not work" is not a
useful problem description.
Horia Chirculescu
Honored Contributor

Re: bash not working

> You must add the string: /usr/local/bin/bash
> to your PATH variable.

>No.

This is correct, Steven Schweda pointed out right. Extract "bash" from that string.

must be read as:

> You must add the string: /usr/local/bin
> to your PATH variable.

Best regards from Romania,
Horia.