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?
sudo
. – Gunnar Hjalmarsson Dec 29 '20 at 23:49alias sudo='sudo '
solves it! tnx – Hikari Dec 30 '20 at 04:06