I don't know why I didn't make these aliases before

A few days ago I created two new aliases for places I connect to with ssh. Both locations have a three character alias now.

To use the aliases I created a new file called ~/.aliases. This file contains all the aliases I use. This file should be sourced in the ~/.bashrc file with the following command.

source ~/.aliases

Then add the following line to the ~/.aliases file.

alias realias='$EDITOR ~/.aliases; source ~/.aliases'

Restart bash and type realias. It will open an editor to the ~/.aliases file and source it when your done.

The ssh aliases look like this. You should change hostname1 to the new of your server.

alias ss1='ssh hostname1'

Another useful alias is lt. It shows the files in order of modification. The files that were changed last, will show up at the bottom.

alias lt='ls -lrt'

Are there any aliases that you like to use?


My name is Peter Stuifzand. You're reading my personal website.