Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Forums
Discussions
Discussions
Discussions
Forums
Discussions
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-19-2006 06:33 AM
06-19-2006 06:33 AM
Thanks
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-19-2006 06:35 AM
06-19-2006 06:35 AM
Re: shell
# echo $SHELL
Regards,
Robert-Jan
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-19-2006 06:36 AM
06-19-2006 06:36 AM
Re: shell
echo $SHELL
That tells you the shell
Take the output of that and used the what command.
what /bin/sh
SEP
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-19-2006 06:48 AM
06-19-2006 06:48 AM
Re: shell
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-19-2006 07:02 AM
06-19-2006 07:02 AM
Re: shell
Note carefully that the HP-UX standard shell is the POSIX shell.
For root, this is the statically linked executable: '/sbin/sh'.
For non-root users, the dynamically linked version provides a smaller memory footprint and is found in '/usr/bin/sh'.
Do *not* change root's shell. To do so means your system will not boot! Remember that '/usr' isn't mounted in single-user mode and/or during the early startup scripts.
The old Bourne shell (which is virtually useless) resides in '/usr/old/bin').
The POSIX shell is a Korn ('ksh') variation conforming to Posix standards.
Regards!
...JRF...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-19-2006 07:03 AM
06-19-2006 07:03 AM
Re: shell
finger $(id -un)
Bill Hassell, sysadmin
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-19-2006 07:24 AM
06-19-2006 07:24 AM
SolutionIf you enter a bogus command into some shells, the error they return is prefaced with the name of the shell:
# garbage
sh: garbage: not found.
However, 'echo $SHELL' is far more reliable.
Regarding the missing commands, either:
1) Your $PATH does not include the directory containing the system admin commands,
or
2) The binaries for the commands do not exist on your system.
To determine which is the case, choose a command from your book and run:
find / -type f -name 'your_command_here' -exec dirname {} \;
If you get any results, you are most likely in case #1. Repeat the find with another command or two, and then add the result to PATH in ~/.profile.
If you do not get any results, repeat the find with another command. If you still do not get any results, the binaries are not on your system, or you do not have permission to see them. The latter is not the case if you do the find as root.
PCS
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-20-2006 11:51 PM
06-20-2006 11:51 PM
Re: shell
$ env
rgs,
ran
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-21-2006 12:21 AM
06-21-2006 12:21 AM
Re: shell
i'm not ok with you.
my shell is bash and when i do "echo $SHELL" the value /bin/sh is returned, so, SHELL var is not the shell i use.
--
Cheers,
Cédrick Gaillard
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-21-2006 12:22 AM
06-21-2006 12:22 AM
Re: shell
As far as some system admin command not working - the reason could be either the PATH is not set or the if the command is related to any package then that software package may not be installed on your system.
When running any command you can check if the shell will find the command [If PATH has been set] using which
which ps [ If found it will show the full path of the command ]
/usr/bin/ps
which xyz
If not found it will show
no xyz in /usr/sbin /usr/bin /opt/ansic/bin ....
Which means since PATH variable does not include the directory where this command is located, shell cannot find it.
Also you may tell us which command you are trying and also tell us the output of echo $PATH if you need more help on this.
Regards,
Ninad
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-21-2006 12:31 AM
06-21-2006 12:31 AM
Re: shell
Actually, I have to disagree w/just about everyone...
The standard answer "echo $SHELL" will tell you what shell you logged in as, not necessarily what shell you're currently using:
To wit:
$ grep root /etc/passwd
root:x:0:3::/root:/sbin/sh
$ sudo su -
Password:xxx
# echo $SHELL
/sbin/sh
# /bin/ksh -o vi
# echo $SHELL
/sbin/sh
# echo $0
/bin/ksh
So, "echo $0" is the correct answer. $SHELL is an environment variable that gets set during the login process. If you change shells anywhere in the process, $SHELL no longer contains the correct information.
HTH;
Doug
------
Senior UNIX Admin
O'Leary Computers Inc
linkedin: http://www.linkedin.com/dkoleary
Resume: http://www.olearycomputers.com/resume.html
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-21-2006 02:03 AM
06-21-2006 02:03 AM
Re: shell
--
Cedrick Gaillard