Mandating path of POSIX-compliant shell? (was: Re: #! -- reconsideration?)

Dan Kegel dank at
Tue May 9 11:10:55 PDT 2000

(Note to Austin folks: I'm cc'ing this to the LSB list since they
 are working on a standard for Linux which will mandate things
 like the location and properties of /bin/sh.)

(Note to LSB folks: 
 The Austin Common Standards Revision Group (CSRG) is a joint technical
 working group established to consider the matter of a common revision
 of ISO/IEC 9945-1, ISO/IEC 9945-2, IEEE Std 1003.1, IEEE Std 1003.2 and
 the appropriate parts of the Single UNIX Specification.)

Donn Terry wrote in austin-group at
> When I first saw the proposal to restore #!, I thought
> it was a good idea.  I'm now caught up in a discussion
> about the path to the shell in the gcc list (the key
> elements are attached).  #! is closely tied to the path
> to the shell (or rather its lack).  I recognize that
> the "system configuration" discussion addresses the
> problem, if a bit obliquely.  However, as you can
> infer from the mail discussion, the very bright (if
> sometimes opinionated, but aren't we all) folks in
> gcc land are having problems finding the POSIX shell,
> and thus aren't using it.
> ...
> I believe that #! as it currently stands will only help
> make this situation worse: building the pathname to a
> shell into scripts will tend to lock in particular pathnames,
> and very much in particular, the minimal Bourne shell.
> I see two solutions to this, neither of which I really like:
> 1) Change #! so it in some way honors some sort of user-controlled
> path analog.  (Don't ask me how... I can imagine all sorts of
> things but they all give me the twitches.)
> 2) Require that all systems claiming conformance to the standard
> provide one command in ALL environments that lets the user bootstrap
> into a conforming environment.  

Musing on this problem, I guessed that '/bin/posixsh' was a reasonable
name for the posix-compliant shell, and did a web search for posixsh. is a
related thread.  One message in that thread, says:
> > If we decide that /bin/sh is an XPG3 shell, then we need to decide
> > where the POSIX confirming shell will be placed.  The options include:
> >
> >   /bin/posixsh (or another name, would be ugly if used for more programs)
> >   /usr/xpg4/bin/sh (Solaris)
> >   /usr/posix/bin/sh
> >   /opt/posix/bin/sh
> I'd favour /usr/posix/bin/sh
> since there may be other utilities where there is a clash
> with existing behaviour that we deem serious enough to
> support two different versions.

Alan Cox seemed to favor /bin/posixsh in

Following Solaris's lead with xpg4, /usr/posix/bin/sh seems like a reasonable
proposal.  What do the LSB folks think about this?

Is it beyond the scope of the Austin group to suggest this practice?
- Dan

Oddly enough, it looks like Windows might support #! somehow, see

For reference, has a link to the
relevant Linux standards that will specify location of shells.

Entia non sunt multiplicanda praeter necessitatem.

More information about the lsb-discuss mailing list