- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Re: cmd for identifying shell
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
01-21-2005 12:28 AM
01-21-2005 12:28 AM
what command is used to check in which shell we are working now.?
If i need to change the shell what steps need to be followed.
tar
siva
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-21-2005 12:31 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-21-2005 12:34 AM
01-21-2005 12:34 AM
Re: cmd for identifying shell
echo $SHELL
if you wish to change your default shell (the one from your entry in /etc/passwd)use the chsh command, then log out and back in to pick up the change
eg:
chsh user1 /usr/bin/ksh
If it's only the shell for your current session you wish to change use
exec NEW_SHELL
eg:
exec /usr/bin/ksh
One thing you should never do is change the default shell for the root from /sbin/sh, as this will cause you problems when you next reboot the server.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-21-2005 01:06 AM
01-21-2005 01:06 AM
Re: cmd for identifying shell
You can use
#echo $SHELL
/sbin/sh (This will tell which shell you are in)
Rgds
HGN
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-21-2005 01:17 AM
01-21-2005 01:17 AM
Re: cmd for identifying shell
echo $SHELL
look at /etc/passwd file
ps -f
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-21-2005 01:53 AM
01-21-2005 01:53 AM
Re: cmd for identifying shell
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-24-2005 01:25 AM
01-24-2005 01:25 AM
Re: cmd for identifying shell
After login you could simply fork (start) a new shell.
So - if you have csh as a login shell, just type start ksh to enter korn-shell.
The chsh is for changing the login shell for a specific user permanent.
The file /etc/shells specifies which shells is allowed as login shells.
If you want to ensure running a script with a specific shell you should specify this in the first line of the shell.
Example: #!/bin/sh
This will remove the risk of having a script that fails if the login shell for the user changes.
/Tor-Arne
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-26-2005 11:24 PM
01-26-2005 11:24 PM
Re: cmd for identifying shell
You only need use command:
# ps
PID TTY TIME COMMAND
29111 pts/2 0:00 ps
14504 pts/2 0:00 sh <----
In this case the shell used is bourne shell.