Changing color of folders, files, execs on iTerm2

bashiterm

on iTerm2 bash

If there any way to change the color when 'ls' so i can quickly know if it's a directory, a file, a script, exec?

Just like the Ubuntu terminal so you know a directory color for example its green

Thank you!

Best Answer

You can use the G option of ls, which takes its colours from LSCOLORS. To always use the G option with ls, add an alias to a sourced file.

alias ls="ls -G"