Answer the question
In order to leave comments, you need to log in
How to change the greeting in bash?
After starting the terminal, I have something like this greeting
Between the colon and the $ sign, the current directory is always displayed. Which configuration file is responsible for generating the greeting? I'm going to do the same for a friend of mine. username@comp:~$
Answer the question
In order to leave comments, you need to log in
I give my version, just drive in the terminal:
PS1='\[\e[0;31m\]\u\[\e[m\] \[\e[1;30m\]\w\[\e[m\] \[\e[0;31m\]\$ \[\e[m\]\[\e[0;32m\]'
~/.bashrc is responsible for prompt
Read: www.linux.com/learn/tutorials/772396-how-to-make-a...
Generator: https://www.kirsle.net/wizards/ps1.html
here is my option. It needs to be placed in the .bash_profile file in the user's directory, and in the user's /root/ directory
PROMPT_COMMAND='echo -en "\033]0;${USER}@${HOSTNAME} ${PWD}\007"'
PS1='\[\033[0;36m\]\t\[\033[38;05;28m\] :: ($?) ===============================================================\n\n\n\[\033[1;35m\]\[email protected]\H\[\033[1;33m\] \w \[\033[1;32m\]\$\[\033[00m\] '
PS2='\[\033[38;05;46m\] > \[\033[00m\]'
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question