0
I'm wondering if there is a way to inject alias when you switch to root profile with sudo.
What I have in mind is this:
sshLogin@linuxVM /home/sshLoginUser/> sudo su -x "alias goHome='cd /home/sshLoginUser/'"
root@linuxVM /home/OtherDir/> goHome
root@linuxVM /home/sshLoginUser/>
I am using a VM box on cloud to setup and run some operations, and I want to eventually add more alias for repetitive tasks.
Ideally, I would like to sudo su
and source
on a file which contains my collection of aliases and functions.