echo "alias sudo='sudo '" >> ~/.bashrc
. ~/.bashrc
If the last character of the alias value is a blank, then the next command word following the alias is also checked for alias expansion.
Eu tenho alguns aliases configurados no meu ~/.bash_profile e os mesmos exatos configurados em /root/.bash_profile para que eu possa fazer v file em vez de vim file e etc.
Funcionam bem quando estou realmente conectado como usuários, mas quando faço algo como sudo v file , o sudo não consegue descobrir o alias e falha.
Existe uma maneira de o sudo entender os aliases?
echo "alias sudo='sudo '" >> ~/.bashrc
. ~/.bashrc
If the last character of the alias value is a blank, then the next command word following the alias is also checked for alias expansion.