Last active
November 4, 2023 03:51
-
-
Save latuminggi/f1ef1cc11f05660b7910c1a55cd38e9f to your computer and use it in GitHub Desktop.
Informative Linux Terminal with Horizontal Separator
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
### 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 |
Author
latuminggi
commented
Oct 29, 2023
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment