Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save latuminggi/f1ef1cc11f05660b7910c1a55cd38e9f to your computer and use it in GitHub Desktop.
Save latuminggi/f1ef1cc11f05660b7910c1a55cd38e9f to your computer and use it in GitHub Desktop.
Informative Linux Terminal with Horizontal Separator
### This bash script below has been tested on Oracle Linux 8
### Put these 3 lines in the bottom file of your ~/.bashrc
export SERVER_NAME="[MyServerName] "
export PS0='\[\e[1;33m\]└─ exec @ \D{%F %T%z} $(eval printf %.0s─ '{36..'"${COLUMNS:-$(tput cols)}"\}; echo)\[\e[m\]\n'
export PS1="\n\[\e[1;33m\]┌$(eval printf %.0s─ '{2..'"${COLUMNS:-$(tput cols)}"\}; echo)\n├─ \h ($(eval hostname -I|cut -f1 -d' ')) ${SERVER_NAME}@ \w\n├─ \[\e[1;36m\]\u \\$\[\e[m\] "
### Adjust env SERVER_NAME, save and execute command below
$ source ~/.bashrc
@latuminggi
Copy link
Author

image

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