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

When I type ll or ls to list the contents of a directory...

The ls command shows un-hidden files and folders in a horizontal view.
To show the hidden folders, I have to type ls -a. I like how this works.

The ll command shows all files and folders, including hidden ones without needing to add -a.

I would like ll to list only unhidden files and folders by default. And if I want to show the hidden ones, I'd like to have to type ll -a. How can I set this up?

share|improve this question
up vote 4 down vote accepted

Open the file .bashrc in your home directory. The should be an entry which looks like:

alias ll='ls -la'

Remove the last a, save the file and open a new shell. Now ll should work as want you. If you do not find the line, you can add it to your .bashrc:

alias ll='ls -l'
share|improve this answer
Also note worthy, I had to logout and log in before these changes took effect or at least start a new terminal session. – Frantumn Nov 1 '12 at 17:11
Yes, you can also type . .bashrc or, alternatively, source .bashrc to make the terminal reread the settings in the file .bashrc without exiting from the terminal. – Michele Nov 2 '12 at 15:35
Hi, logged as root in my $HOME/.bashrc I can see that alias, but still not working. I reloged and rebooted the server but... nothing. Any other clue? ty so much! :) – Sergi Oct 24 '14 at 17:33

Technically ll is not a command on its own but an alias setup for slightly longer commands; by default it is set to ls -l.

For instance on your case, you can set ll to ls -l with

alias ll='ls -l'

to your .bashrc file.

You can also use alias to add some time-saving commands. For instance, if you often update from the terminal you can assign a shortcut string to the command apt-get update and apt-get upgrade with:

alias up='apt-get update && apt-get upgrade'

Now you can just type up to save time.

share|improve this answer
Thank you, a very good point. And helpful to know. – Frantumn Nov 1 '12 at 17:22

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.