For me one of the beautiful parts of using Linux is being able to script everything I need. I have scripts that change my Razer Tartarus Profiles, run Hudkit, handle browser sounds, and so much more.
Having scripts is great, but being able to get the script to run with a set of commands that I create? chef’s kiss
The following is a quick and dirty how to. No explanations really, but if you need help just reach out to me on Mastodon.
- Edit bash_aliases:
vi ~/.bash_aliases(yes, I am a vi user)
- Add alias:
alias aliasname="command user@location"
- Refresh bash:
The above works only if
.bashrc includes the following code:
if [ -f ~/.bash_aliases ]; then
Connect to a server through ssh with a specific user using the command
alias pumpkin="ssh [email protected]"
There are circumstances where I would not recommend using a bash aliase for SSH. Check out my article on SSH Config to see if that option works better for your use case.
Run updates with the command
alias yiss="sudo apt update && sudo apt upgrade"
Quickly view available aliases because you know you’ll forget