skip to content
Keshav Mohta

Color the output in terminal

/ 1 min read

Color the ls output in terminal

color the ls output

ls —color=auto

make alias in .bash_aliases file

alias ls='ls --color=auto'install

Terminal window
RED='\[\033[01;31m\]'
YELLOW='\[\033[01;33m\]'
GREEN='\[\033[01;32m\]'
BLUE='\[\033[01;34m\]'
GREY='\[\033[01;37m\]'
WHITE='\[\033[00m\]'
HOST='\033[02;36m\]\h'; HOST=' '$HOST
TIME='\033[01;31m\]\t \033[01;32m\]'
BRANCH=' \033[00;33m\]$(git_branch)\[\033[00m\]\n\$ '
PS1=$TIME$USER$HOST$LOCATION$BRANCH
PS2='\[\033[01;36m\]>'