I have a VPS and an associated IP address for it. I'm doing a lot of work with it in my bash shell and I'm wondering if there's some way I can create either an alias or a environmental shortcut for the IP address to avoid having to type it every time. How would I do this?
Add to your
Then you can use
$myip on the command line after logging in or running
Aliases only work as commands, so you use it to replace commands which might include your IP:
alias myping='ping 18.104.22.168' alias myssh='ssh firstname.lastname@example.org'