You can shorten commands by creating an alias. Aliases should be put in
~/.bash_aliases (not in
You can create
~/.bash_aliases with the following command:
You can now edit the file and put your alias in there in the format:
alias subl='nohup sublime . &'
Be warned that if your define an alias that has the same name as a command, the alias takes precedence. This can be useful:
alias ls='ls -alF --color=auto'
Will always give you coloured, classified, complete lists when using
Why not in
.profile are usually filled with all kind of nifty things by default. While this is certainly useful, it's not convenient when adding aliases yourself. Someone has apparently thought of this and added the following to the default
# Alias definitions.
# You may want to put all your additions into a separate file like
# ~/.bash_aliases, instead of adding them here directly.
# See /usr/share/doc/bash-doc/examples in the bash-doc package.
if [ -f ~/.bash_aliases ]; then
.bash_aliases exists, it's loaded by
.bashrc and you have an entire file for all your aliases. If you install the
bash-doc package there are some examples that can be found in: