Skip to content

Instantly share code, notes, and snippets.

@nedmas
Created July 6, 2012 13:30
Show Gist options
  • Save nedmas/3060155 to your computer and use it in GitHub Desktop.
Save nedmas/3060155 to your computer and use it in GitHub Desktop.
Script to force enable color prompt on Ubuntu and other Linux distros.
#!/bin/bash
# Get the path for the .bashrc file from the prompt or set it as being in the users home dir.
BASHRC="${1:=~/.bashrc}"
# Use sed to remove the comment from the force color line in the .bashrc file.
sed -i 's/#force_color_prompt=yes/force_color_prompt=yes/g' $BASHRC
# BONUS: Uncomment to change the default color of the prompt.
#sed -i 's/1;32m/1;31m/g'
# Reload the .bashrc file
source BASHRC
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment