1832935 Members
2936 Online
110048 Solutions
New Discussion

Re: default shell

 
SOLVED
Go to solution
Shivkumar
Super Advisor

default shell

I guess hpux uses posix shell as a defualt. what is the difference between posix and bourne shell ?

What is the command to verify defualt shell ?

Thanks,
Shiv
7 REPLIES 7
Yogeeraj_1
Honored Contributor

Re: default shell

hi,

for more information on the different shell, do "man sh"

to futher drill down on the man pages, try:
man sh-bourne #Bourne Shell (/usr/old/bin/sh) description.
man ksh #Korn Shell (/usr/bin/ksh) description.
man sh-posix #POSIX Shell (/usr/bin/sh) description.
man csh #C Shell (/usr/bin/csh) description.
man keysh #Key Shell (/usr/bin/keysh) description.


to verify the default shell,
do:
echo $SHELL


hope this helps too!

regards
yogeeraj
No person was ever honoured for what he received. Honour has been the reward for what he gave (clavin coolidge)
Yogeeraj_1
Honored Contributor

Re: default shell

hi again,

note that the default shell in hp-ux is the POSIX shell. Note that the Bourne shell is a subset of the default HP-UX shell.

read more on page 466 on marty's book!

regards
yogeeraj
No person was ever honoured for what he received. Honour has been the reward for what he gave (clavin coolidge)
Joseph Loo
Honored Contributor

Re: default shell

hi shiv,

to verify shell:

# echo $SHELL
or
# cat /etc/passwd
the last parameter for each user

regards.
what you do not see does not mean you should not believe
Joseph Loo
Honored Contributor

Re: default shell

hi shiv,

forgot the first part of your questions, here goes:

http://docs.hp.com/en/B2355-90046/ch15s03.html

http://docs.hp.com/en/B2355-90164/ch03s04.html

regards.
what you do not see does not mean you should not believe
Indira Aramandla
Honored Contributor

Re: default shell

Hi Shiv,

You can ehco the shell when you logged on as a user to fing the default shell

by
echo $SHELL

or the password file /etc/passwd has a record of the username, user-id, user group, home directory and the default shell for the user.

IA
Never give up, Keep Trying
Cem Tugrul
Esteemed Contributor

Re: default shell

Shiv,

echo $SHELL
may show what you actually running shell;
also for to understand your users running
shell;
cat /etc/passwd|grep -i userid or username

Good Luck,
Our greatest duty in this life is to help others. And please, if you can't
Bill Hassell
Honored Contributor
Solution

Re: default shell

The Bourne shell has been deprecated (not recommended) for at more than a decade, and in HP-UX, it is hidden in the directory /usr/old/bin/. Unfortunately, HP chose the name sh for it's POSIX shell so newcomers to HP-UX will assume that if the shell is sh, then it muist be the Bourne shell. You can easily test whether the shell is Bourne by typing something like this:

export x=1

In Bourne, the produces the error:

x=1: is not an identifier

but for POSIX shells, the command works just fine. Notice I said "POSIX shells"? POSIX is a standards organization and you can read more about it at http://www.posix.com/posix.html

The Korn shell is the model for POSIX standard so the Korn shell, BASH and HP's POSIX shell are all POSIX-compliant shells which means that they are virtually identical. Most of the differences are in user profiles, specialized user interfaces such as defining non-ASCII keys (like arrow keys), and command line recall/editing options.

So if you're familiar with Korn or BASH, there is virtually no difference between the shells. NOTE: in HP-UX, the root shell *MUST* be /sbin/sh. The /sbin directory is the special purpose directory used for bootup and single user mode. All commands in /sbin have been compiled to not require the /usr/lib directory (which is not present in single user mode).


Bill Hassell, sysadmin