Skip to main content

My Bash Terminal Setup

Append the following line in ~/.bashrc

#Use echo to append the following line to ~/.bashrc
echo 'export PS1="\[\e[0m\][\[\e[0;93m\]\d \[\e[0;93m\]\t\[\e[0m\]] \[\e[0;92m\]\u\[\e[0m\]@\[\e[0;92m\]\h\[\e[0m\](\[\e[0;91m\]$(ip route get 1.1.1.1 | awk -F"src " '"'"'NR==1{split($2,a," ");print a[1]}'"'"')\[\e[0m\]) \[\e[0m\]\w\[\e[0m\]:\n\[\e[0;96m\]\$\[\e[0m\]"' >> ~/.bashrc

The terminal should look like this now:

Screenshot 2022-11-02 000424.png