I have two aliases set up in my .bash_profile
. I want sudo
to honor both of them:
$ cat ~/.bash_profile
export EDITOR=emacs
...
alias yum="dnf"
alias ssh="ssh -2"
...
I know how to tell sudo
to honor my environment (-E
), but I can't find the option for aliases. Searching the man page for alias
results in Pattern not found
.
How do I tell sudo
to honor my aliases?
Thanks in advance.
I'm trying to avoid these annoying messages due to Fedora changing commands:
$ sudo yum update
[sudo] password for:
Yum command has been deprecated, redirecting to '/usr/bin/dnf update'.
See 'man dnf' and 'man yum2dnf' for more information.
...