Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Any particular shell?

Status
Not open for further replies.

unixstudent

Technical User
Oct 9, 2000
4
0
0
US

Hello everyone,

Is there a particular shell that should be used when I'm in root? Is the default shell the safe choice? Or is there one shell that supercedes all for root purposes?

-UNIX student [sig][/sig]
 
It's usually a lot safer to stick to the "standard" shell that root has been set up with. If you start using other shells, then you may find that root is running a shell that is dynamically linked. When you reboot the system, and the system tries to run things as "root", the shell might not work because the file system containing the libraries has not been mounted yet... This would stop the system from booting.

(And please don't ask me how many times I've done this on a Solaris server by setting &quot;root&quot; to use /usr/bin/ksh... OK. Three times. But I've got it memorised now - leave the root shell alone! :) ) [sig]<p> Andy Bold<br><a href=mailto: > </a><br><a href= > </a><br>"I've probably made most of the mistakes already, so hopefully you won't have to..." Me, most days.[/sig]
 
I don't know about the other Unixes On *every* install of FreeBSD or Linux I do, the first thing I do is set bash as my standard shell. I recommend it as the shell for getting around quickly on your system. Among many others, the simple features of autocompleting directories and files with the tab key, and up or down arrow for command history transformed my whole concept of the shell. (having been brought up with DOS :)

I've never had a problem of any sort with using the bash shell for login. However, you don't have to commit to a shell to use it. If you want to be sure and not mess up the root profile, just install bash, and only run it when you want after logging in with sh, or csh, or whatever the default shell is. Then, if any trouble comes up, you just drop out (CTRL-D is common) and you will be back in the original shell.

Also, in FreeBSD, and some other Unixes, the standard 'ls' doesn't support color listing of directories, so I recommend installing 'colorls' or 'gnuls'. You can then alias ls=&quot;colorls -aFG&quot;, for example, which makes for a very readable shell. [sig][/sig]
 
Most sites I have worked at tend to prefer the Korn shell as it has a lot more functionality.
The norm is to leave the Bourne shell as the default then have .profile call .kshrc to set up the Korn environment.


[sig]<p>Ged Jones<br><a href= > </a><br>Top man[/sig]
 
I'm with Andy-B here -- you can *really* have troubles by specifying the wrong shell for a root account.... [sig][/sig]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top