I have some productivity aliases on ~/.bashrc, which I'm missing when I run something on sudo. In example, I have an alias with parameters for ncdu, which doesn't work when I wanna use it on folders with files that my user can't read.

I had searched and read https://unix.stackexchange.com/questions/228314/sudo-command-doesnt-source-root-bashrc explaining why /root/.bashrc doesn't work and how to not do it.

But how to make it work? I'd like to have aliases available as commands for sudo.

Should I use sudo su all the time?

  • You can create aliases which include sudo. Dec 29, 2020 at 23:49
  • lol a simple alias sudo='sudo ' solves it! tnx
    – Hikari
    Dec 30, 2020 at 4:06


Browse other questions tagged or ask your own question.