setting env variables.
When I open a terminal, I get get bash. When I use su and go to root I get sh.
How do I change what shell is used in root? Thanks... |
It is set in /etc/passwd.
--- rod. |
I found it! Thanks.
now, how do I change it to bash? I don't think 'nano passwd' will do anything. Is there any reason why it is set to sh? |
As root, you can edit it to whatever you choose.
--- rod. |
thanks.
By the way, how can I permanently keep the -G option for ls?? |
Quote:
A cleaner way is to run the "chsh" command. It will ask you for the new shell. Press enter and your dropped in your new shell right away. And there no risk of making dangerous mistakes. Also, non-root users can use "chsh" to change their own shell. |
You could use an alias (assumes bash shell)
Code:
alias ls='ls -G' Code:
source ~/.bashrc --- rod. |
I think it's far safer to use the chsh program to change your shell, rather than editing /etc/passwd directly. (Just become root and then enter chsh.)
I would go further and say you should never edit that file directly if you can avoid it. (Maybe I'm being overly cautious.) Apologies - Hko got there first. I should have read more slowly. |
Quote:
--- rod. |
Quote:
"chsh" checks if your entry is valid as shell and thus protects you from all typos (eg. /bin/bosh). |
Quote:
Now I'm curious: does anyone know of other similar examples? |
Quote:
Though this does not write in /etc but somewhere in /var/spool/... And of course using the command passwd instead of typing your root password into /etc/passwd with an editor. :-) |
All times are GMT -5. The time now is 08:50 AM. |