bashrc and root
I have a simple couple of alias` set up on my user account.
alias ls='ls -l --color' alias .='cd ..' alias ..='cd ../..' All well and good! When I su to root, and ls, I get the normal output shown, and not my desired output long-form with colour. So I should change the roots .bashrc too right? I tried this too my changing /root/.bashrc and the alias` aren't used. So which file should I be editing to enable my alias commands for root? I could change the /etc/bashrc file(!?) and it would be changed system wide, but this isnt exactly what I am trying to do! Any ideas? |
/root/.bashrc
|
Quote:
Code:
# .bashrc |
Changes should appear but you will need to log out and login back for changes to take effect.
|
Well that section in mine looks like:
Code:
if [ -x /usr/bin/dircolors ]; then |
Yep, I tried logging out of root, then back in, and even tried rebooting (windows behavior! ahem). Still no joy though, editing the /root/.bashrc file doesn't add the colour and long form I am after.
|
Code:
su - |
Yes You have to do su - as to make this bashrc execute while logging
|
Ahh a pesky little -
Thank you all for the help! :) |
Hi,
I like to setup properly with a '.bash_profile' and a '.bashrc'. Quote:
Quote:
I like to have a colored prompt to differentiate the root from a normal user since I will be using multiple consoles. |
All times are GMT -5. The time now is 02:04 AM. |