Might be unrelated background: Before upgrading Mint from 18 to 20.1 this problem not happening.

I have list of aliases in /home/enter/.bash_aliases. I can use those aliases as a normal user, but I want have it too when I am using root.

Someone tell that .bash_aliases is being included by default, but the fact it's not when using root (using sudo -su).

By some comment on bashrc sample, I made addition on ~/.bashrc (/home/enter/.bashrc):

if [ -f /home/enter/.bash_aliases ]; then
    . /home/enter/.bash_aliases

Could you help to locate where is the mistake? Those aliases not available when using root. A clear explanation is another niceness :)

  • What exactly is the problem? Are you getting an error of some sort? By ~/.bashrc, do you mean your /home/enter/.bashrc or /root/.bashrc? – muru Feb 15 at 1:41
  • It would be helpful to know how you are "using root" - via su? via sudo? If the latter, then the difference in behavior between versions may be the result of changes in sudo's default set_home configuration – steeldriver Feb 15 at 1:58
  • Q updated, oh man @ muru already give some clue. @steeldriver ah that makes me more confused, but thanks :) – Adi Prasetyo Feb 15 at 4:32

just do source .bash_aliases, simple explanation already on superuser question

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.