First of all, you could su as the user whose account you want to modify
and not as root if you want to.
secondly, the .bashrc file is read for shells that are not login
shells, so if you want it in the login shell you have to have it in
.bash_profiles. The problem there is that your aliases will only be in
the login shell, so better yet, have .bash_profiles source .bashrc.
This way they will be included in login and interactive shells. Make
sure that you have a .bash_profile and that it sources the .bashrc file,
if it exists.
if [ -f ~/.bashrc ]
then
source ~/.bashrc
fi
(instead of the word source, you could have a period )
scott
Mario Lombardo wrote:
> I want this to work in one of my user's .bashrc files:
> alias l='ls -lAF --color=auto'
>
> I 'su root' and after I change the file and save it, I exit su and
> exit the user account and log back in as the user, but the settings
> won't work, yet I verify the changes took place in .bashrc. What's
> going on?
>
> Also, are users able to run alias at the command prompt? Usually
> running this command alone will give all of the currently set aliases.
>
> Mario
>
This archive was generated by hypermail 2.1.3 : Fri Aug 01 2014 - 19:35:24 EDT