0

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?

Hikari
  • 203
  • 1
  • 2
  • 8

0 Answers0