Operating System - HP-UX
1834052 Members
2558 Online
110063 Solutions
New Discussion

Re: Which is posix shell?

 
SOLVED
Go to solution

Which is posix shell?

Hello folks,
I am always confused about this issue.
Which is the posix shell in HP-UX? Is it /usr/bin/sh or /sbin/sh?

Is there a command to know the type of shell I am using?

Please enlighten me!!!

bye,
Raghu.
Unix is not for those who donot love Unix!
5 REPLIES 5
Animesh Chakraborty
Honored Contributor

Re: Which is posix shell?

Hi Raghu,
As of the HP-UX 10.0 release, the OSF POSIX Shell replaces the Korn Shell and Bourne Shell. Thus, /usr/bin/sh will be the POSIX Shell, and /usr/bin/ksh will be linked to /usr/bin/sh. However, /usr/old/bin/sh will contain the Bourne Shell for those users who still need it.

Hopre you are enlighten now :)

Did you take a backup?
Kenny Chau
Trusted Contributor
Solution

Re: Which is posix shell?

 
Kenny

Re: Which is posix shell?

Thank you very much guys...
really ur response DID enlighten me ;)
Unix is not for those who donot love Unix!
Darrell Allen
Honored Contributor

Re: Which is posix shell?

Hi Raghu,

The answer is BOTH!

/usr/bin/sh is the dynamically linked POSIX shell which should be generally used. That's what I use in my scripts though /sbin/sh will also work.

/sbin/sh is the statically linked POSIX shell that should be used by root. DO NOT CHANGE ROOT'S DEFAULT SHELL! When you boot into single user or maintenance mode, the dynamic libraries are not available by default. Root needs to use /sbin/sh to avoid that problem. Changing root's shell can cause you to have to boot into a recovery shell to access the system for maintenance.

Darrell
"What, Me Worry?" - Alfred E. Neuman (Mad Magazine)