Why my tmux has no color?
I have installed tmux
and oh-my-bash
on my Ubuntu 22.04. However I found that the text in my tmux is all white which is not the same as my colorful bash theme (even if the original terimal). I tried ls
command, the output text is still all white, but vim
works normal. Based on these I guess it's a profile issue.
It really confused me because I only know .bashrc before. Then I found key to my problem in @Chris Laidler's answer to the Tmux Colors Not Working question:
This is a bit of an old one. I resolved this issue by creating a .bash_profile file and sourcing my .bashrc file.
To do this, add
source ~/.bashrc
to your .bash_profile file.The problem in my case was due to my bashrc settings not being sourced via tmux. Tmux runs as a login shell so it looks for a .bash_profile file or a .bash_login file. My colours were being set in my .bashrc file.
So I appended my .bashrc file to .bash_profile:
cat ~/.bashrc >> ~/.bash_profile
and solved this problem. Now my tmux also uses my bash theme.
Last updated