Skip to content

Instantly share code, notes, and snippets.

@Chinmay1743
Created February 13, 2024 06:50
Show Gist options
  • Save Chinmay1743/d13a499c5bbf70e32b719083b735d02a to your computer and use it in GitHub Desktop.
Save Chinmay1743/d13a499c5bbf70e32b719083b735d02a to your computer and use it in GitHub Desktop.
Change ugly colours of default terminal (particularly in case of Ubuntu)

For output of ls command

Add the following line of code in your .bashrc file

export LS_COLORS='rs=0:di=01;34:ln=01;36:mh=00:pi=40;33:so=01;35:do=01;35:bd=40;33;01:cd=40;33;01:or=40;31;01:mi=00:su=37;41:sg=30;43:ca=30;41:tw=30;42:ow=34;42:st=37;44:ex=01;32:*.'

LS_COLORS is an environment variable for the command ls. The line above sets the color scheme for different file types. For example, "of" represents the directory and "1;35" represents the color code of the directory. Similarly, "ex" represents the executable and "01;32" represents the color code of the executable. Original Source for LS_COLORS: https://www.tutorialspoint.com/how-to-change-terminal-output-color-in-linux

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment