Ask Ubuntu is a question and answer site for Ubuntu users and developers. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Since first becoming an Ubuntu user I have developed a growing list of aliases, and there are some that I cannot imagine being without. This makes me think that there are probably still tons of aliases that I haven't thought to use which could make the lives of me and fellow ubuntu users easier.

What aliases do you guys use which are:
general - they apply to lots of users
helpful - you use them often or they save a lot of time when you do use them

share|improve this question
Apologies in advance if this is considered too subjective. I think it could become a good resource so I figured its worth trying. – Andy Groff Jan 12 '11 at 23:35
Community Wiki-fied. – Marco Ceppi Jan 12 '11 at 23:52

Here are some that I like:

#Opens current directory in a file explorer
alias explore='nautilus .'

#Opens current directory in a file explorer with super user privileges
alias suexplore='sudo nautilus .'

#Opens current directory in Ubuntu's Disk Usage Analyzer GUI with super user privileges in the background
alias analyze='gksudo baobab . &'

#Opens a GUI text editor in the background. Can obviously be replaced with your favorite editor
alias text='gedit &'
#Same as above with super user privileges
alias sutext='gksudo gedit &'

#Opens a file with whatever program would open by double clicking on it in a GUI file explorer
#Usage: try someDocument.doc
alias try='gnome-open'

#lists contents of current directory with file permisions
alias ll='ls -l -sort'

#list all directories in current directories
alias ldir='ls -l | grep ^d'

#self explanatory
alias ..='cd ..'
alias ...='cd ../../'

#show aliases
alias a='echo "------------Your aliases------------";alias'
#Apply changes to aliases
alias sa='source ~/.bash_aliases;echo "Bash aliases sourced."'
#Edit Aliases
alias via='gksudo gedit ~/.bash_aliases &'
share|improve this answer
Sadly the dd command already exists – Benoît Legat Jul 23 '13 at 14:19
Yea that's a good point. Edited to ldir – Andy Groff Jul 23 '13 at 18:27

The alias I use most often:

alias go=gnome-open
share|improve this answer

These are my preferred aliases:

alias ll='ls -lAbhc'
alias l='ls -lBohc'

#History search (use: hs sometext)
alias hs='history | grep $1'

#Sudo vim
alias svim='sudo vim'

#Add extra protection against mistakes
alias rm='rm -I'

#Unrar alias
alias unrar='rar e'
share|improve this answer
I'm totally gonna use the history search and rm protection. Great addition! – Andy Groff Jan 13 '11 at 4:56

a couple of my favorites (and most heavily used!) are:

alias tgz='tar -zxvf'


alias tbz='tar -jxvf'
share|improve this answer

I use 122 aliases at the moment, so I won't list all of them, but here's a short list of some useful ones:

 # Key press savers
 #  Naturally, key press saving aliases like these are really user-dependent.
 #  These are just a few examples.
alias s='sudo ' # the space allows for command name expansion.
alias g='git'
alias q='exit'

alias ls='ls --color=auto' # color
alias l='ls -F'            # classify
alias la='l -A'            # classify, hidden

alias ll='l -lh'  # human readable
alias lla='ll -A' # hidden

alias x='clear;'
alias xl='clear; l'
alias xla='clear; la'

# not really an alias, but it can be useful
cl () { cd $@ && ls -F; }

alias rs='rsync -avz --progress --fuzzy -e "ssh"'
alias rsd='rsync -avz --progress --delete-after --fuzzy -e "ssh"'

I used to have a small shell function that either changed into a directory or editted a file, depending on what was passed to it. That can be extremely useful when you go to change into a directory but decide to edit a file there instead. I wrote a little sourced shell function that does this and a little more: I'm currently working on rewriting it to handle all sorts of files:

share|improve this answer

There is a website for this called . There are lots of aliases defined by other users and you can add your own aliases to the website and others will rate them. You can even add some of the aliases you like to your list and use them. I even created an alias for updating the my alias list by adding this to my ~/.bashrc:

alias s-update-aliassh='curl -s{Your User}/alias > ~/.bash_aliases; exec bash'
share|improve this answer

Here is my list of alias. Few of them have already been included in others' lists.

# Very frequently used. Use: psg java
alias psg='ps aux | grep -i $1'

alias ..='cd ..'
alias ...='cd ../../'

# Updates repo cache and installs all kinds of updates
alias update='sudo apt-get update && sudo apt-get upgrade && sudo apt-get dist-upgrade'

# Frees up the cached memory
alias freemem='sync && echo 3 | sudo tee /proc/sys/vm/drop_caches'

# Useful for history searching. Use: hs java
alias hs='history | grep -i $1'
share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.