The very same ls
aliases are defined on both machines:
$ cat ~/.bash_aliases | grep -e "alias ls=" -e "alias l=" -e "alias lll="
alias ls='\ls --kibibytes --color=always --group-directories-first'
alias l='ls'
alias lll='l -la'
Linux Mint (18.1)
(I sit at this machine.)
$ sudo -s
[sudo] password for ...
$ lll
(very long list of files)
GNU/Linux Debian Stretch (9, testing)
(I ssh
to this machine.)
$ ssh username@ip_address_of_server -p port_number
$ sudo -s
[sudo] password for ...
$ lll
lll: command not found
Question
How do I achieve the goal to have my personal aliases sourced when sudo -s
on Debian like it works on Linux Mint?
sudo -s
explanation
sudo -s
sources aliases on my Linux Mint, whereas sudo -i
or su
or su -
do not.
It is working for my purposes on Linux Mint, I have a lot of useful aliases defined and I want it also to work on my Debian server.