We all know how aliases on the *nix system help to create short commands for the long ones. E.g. kga
can stand for kubectl get all
or gl
for git log --name-status --decorate
. Software associates create such aliases and write them in the ~/.bashrc
file. So aliases are available whenever they logged in to their machine.
However, associates also need to log in to other *nix machines for various purposes. Say a developer needs to log in to the SV system for live troubleshooting of an issue. Or a DevOps Engineer requires to log in to various cloud VMs. One has become very used to his/her alias s/he has created. It's very difficult to copy/paste the aliases every time s/he logs in to the another machine.
Here is one way to address this challenge. Create your aliases, categorize and put them in different files. Say General Aliases, Git Aliases, Docker Aliases etc. Then create a setaliases.sh file. Download it on the machine you have logged in.
wget https://raw.githubusercontent.com/simplyatul/bin/master/setaliases.sh
and then source it
source setaliases.sh
That's it. All your aliases are set.
If you are frequently logging in to a particular machine, then just copy the above source command in the ~/.bashrc
file.
Also published here.