I love nala
and I want to use it, but my muscle memory always goes for apt
and every guide on the internet uses apt
when I copy paste commands.
Is there a way where, even if I type apt
, nala
is still used?
I love nala
and I want to use it, but my muscle memory always goes for apt
and every guide on the internet uses apt
when I copy paste commands.
Is there a way where, even if I type apt
, nala
is still used?
You can create new aliases for both the apt
and nala
commands like this:
alias apt='\nala'
alias dapt='\apt'
The backslash character preceding the commands disable alias expansion, so you can rename commands, but still run the originals (see here).
In addition, for aliases to work with sudo
, you need to add this alias also (see here):
alias sudo='sudo '
Just be aware that if you copy and paste apt
commands from the internet, that you now run with nala
, it's possible that some options are not supported. So be sure to check it's a valid command for nala
before you run it.
You should never never alias system commands, especially as root
. If you want to run nala
, then just run nala
.
You can alias sudo
to sudo
and apt
and/or apt-get
to \nala
, but it is likely not a good idea to do this because something can break.