Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

how to configure colors in vagrant ssh bash

this is the situation: I have a virtual machine with vagrant, it has ubuntu precise32, I have been installed byobu on it, and byobu tunned the promp.

I have in my host machine macosx, the regular macosx terminal emulator, and have been installed oh my zsh, which changed the shell from bash to zsh, and tunned the colors to a very fancy theme.

well, when i connect to vagrant via ssh, all color configuration disappear, and i suppose it loads the configuration from the ~/.bashrc file in the virtual machine.

how can i change the bright purple colors ? is there any bash theme palette cool to install that you would recommend ?

this is the my terminal byobu console on ubuntu precise32 on vagrant image.

thanks.

like image 889
alexserver Avatar asked Dec 05 '13 05:12

alexserver


2 Answers

NOTE: I don't know too much about byobu, but I guess it's similar to tmux.

The simplest thing to do is to install zsh and oh-my-zsh within the vagrant box (suppose you change the default shell by using chsh from bash to zsh). Then when you vagrant ssh to the VM, you'll be using zsh and see all the fancy stuff.

Not sure how purple is set, whether it is byobu customization or settings in .bashrc.

Anyways, if you want to use bash, enable 256 color terminal by setting TERM=xterm-256color, set the prompt colour as you wish, example Gist if you want to use Bash.

like image 95
Terry Wang Avatar answered Nov 03 '22 07:11

Terry Wang


I have managed to get colors and a lot of additional features by installing bash-it.

It's straightforward to install. The installation takes backup of the current ~.bashrc and you can always switch back without any risk.

like image 22
siliconsenthil Avatar answered Nov 03 '22 08:11

siliconsenthil