Using alias to change ls to ls-l changes(or disables) the colors of ls output

8,411

After searching more, I found about the --color option so I used this:

alias ls="ls -l --color" and it worked fine!

Share:
8,411

Related videos on Youtube

Chris
Author by

Chris

Updated on September 18, 2022

Comments

  • Chris
    Chris almost 2 years

    I've used alias to change ls to ls -l, but the colours change to the normal font of the terminal (also tried ls -l before the alias command and the colours appeared fine).

    What is wrong?

    Thank you

  • waffl
    waffl almost 10 years
    Just a note for mac users, the code would be alias ls="ls -l -G" via this answer