I'm running Xubuntu 12.04, and when I use the Terminal I get colored filenames from ls
. But inside tmux, everything ls prints is white. I know my tmux supports color, though, because I get color syntax highlighting when I run vim. My ~/.tmux.conf has this line already:
set -g default-terminal "screen-256color"
Here are some environment variables (from within tmux):
$ env | grep COLOR
LS_COLORS=di=34:ow=34
$ echo $TERM
screen-256color
How can I get ls to show me color when inside tmux?
Best Answer
ls
don't outputs colors by default, usually it is an alias tols --color=auto
setted in.bashrc
. Check if you're invokingls
directly or through an alias withtype ls
.If it outputs
ls is /bin/ls
maybe your.bashrc
wasn't loaded when you created thetmux
session. If so, try to reload it withsource ~/.bashrc
.