Skip to content

Instantly share code, notes, and snippets.

@motleytech
Created June 25, 2016 05:35
Show Gist options
  • Save motleytech/c487d8c03dd352fcbe12539fed74ac75 to your computer and use it in GitHub Desktop.
Save motleytech/c487d8c03dd352fcbe12539fed74ac75 to your computer and use it in GitHub Desktop.
ls colors and shortcuts

If you are missing colors in the terminal / console, (and the 'l' shortcut command) here is how to fix that.

Open your ~/.bashrc file in an editor

vim ~/.bashrc

and add the following at the bottom

alias ls='ls --color'
alias ll='ls -alF --color'
alias l='ll'

This adds 3 aliases. It makes ls display colors by default and also defines useful shortcuts - ll and l.

Save the file (in vim, press escape, followed by :wq and press enter).

In the terminal, run source ~/.bashrc to apply the changes.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment