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\][\[$(tput\e[0;93m\]\d sgr0)\]\[\033[38;5;11m\e[0;93m\]\d\[$(tput sgr0)\] \[$(tput sgr0)\]\t\[\033[38;5;9m\]\A\[$(tput sgr0)\e[0m\]] \[$(tput sgr0)\]\[\033[38;5;13m\e[0;92m\]\u\[$(tput sgr0)\e[0m\]@\[$(tput sgr0)\]\[\033[38;5;10m\e[0;92m\]\h\[\e[0m\](\[\e[0;91m\]$(tputip sgr0)route get 1.1.1.1 | awk -F"src " '"'"'NR==1{split($2,a," ");print a[1]}'"'"')\]:[\w]e[0m\]) \[\e[0m\]\w\[\e[0m\]:\n\[$(tput sgr0)\e[0;96m\]\[\033[38;5;14m\]\\$\[$(tput sgr0)\e[0m\]"' >> ~/.bashrc

The terminal should look like this now:

Screenshot 2022-11-02 000424.png