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
Discussions
Discussions
Forums
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
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
тАО02-17-2011 12:57 AM
тАО02-17-2011 12:57 AM
shell
1. How can I know what is the default shell I am working with?
2. How can I config/determine the requested shell?
3. Where can I see each shell fetures (win size, ^d, ^z on so on)?
Thanks,
Yaron
- Tags:
- shell
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО02-17-2011 01:41 AM
тАО02-17-2011 01:41 AM
Re: shell
1. You get the shell that is set for any given user in /etc/passwd - you can get see what this is using:
grep ^$(whoami): /etc/passwd | cut -d: -f 7
2. You can change your default shell using the chsh command. You can only set your shell to those listed in the /etc/shells file (if one exists on your system)
3. Read the man page for the shell:
man sh-posix
man ksh
man csh
etc...
WARNING: Do not chnage the default shell for the root user from /sbin/sh - you will break your system...
HTH
Duncan
I am an HPE Employee
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО02-17-2011 02:04 AM
тАО02-17-2011 02:04 AM
Re: shell
General environment definitions could be useful:
#env
#man env
And the current settings of terminal also:
#stty -a
#man stty
Rgds.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО02-17-2011 02:15 AM
тАО02-17-2011 02:15 AM
Re: shell
1. How can I know what is the default shell I am working with?
You can use #echo $SHELL
This gives the default working shell. To see the individual user's shell, you can see it in /etc/passwd as said above.
2. How can I config/determine the requested shell?
USe either usermod -s or chsh
3. Where can I see each shell fetures (win size, ^d, ^z on so on)?
I can think of anything other than the man pages.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО02-17-2011 05:14 AM
тАО02-17-2011 05:14 AM
Re: shell
If you are new to the shell, at least avoid the 'csh' (C-shell) for serious scripting. This classic FAQ discusses why:
http://www.faqs.org/faqs/unix-faq/shell/csh-whynot/
The HP-UX default shell is the POSIX one found as '/usr/bin/sh' for normal users and as a statically linked version for root as '/sbin/sh'.
Regards!
...JRF...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО02-17-2011 05:42 AM
тАО02-17-2011 05:42 AM
Re: shell
as you all noted, sh /sbin/sh is the default shell.
When I open a terminal and type:
#tcsh (to get a better env) still the
#echo $SHELL command gives me /sbin/sh. Why?
Can I determine that tcsh for instance, will be my defualt shell? how?
Thanks,
Yaron
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО02-17-2011 06:45 AM
тАО02-17-2011 06:45 AM
Re: shell
You've also been warned aginst using the C shell which tcsh is a variant of.
As for wht "echo $SHELL" still returns /sbin/sh, this is because the environment variable SHELL is set by login(1) and is then inherited by any command spawned by that process. Unless it explicitly set to something else by the spawned process it will stay as it was. If your login shell were set to tcsh in /etc/passwd then this would show up in the SHELL environment variable - but as indicated above you _should not_ do that for root.
HTH
Duncan
I am an HPE Employee