Monday, April 29, 2024
3
rated 0 times [  3] [ 0]  / answers: 1 / hits: 1729  / 2 Years ago, tue, july 5, 2022, 8:22:54

i'm new to ubuntu .presently i'm using ubuntu 12.04 version.I want to know how to change terminal's displaying text.
currently my terminal displaying the text..



narasimha@narasimha:~$



how can i change it with narasimha@reddy:-$


More From » command-line

 Answers
2

All you really have to do is edit a system variable, $PS1, to be exact.



You would have to edit the ~/.bashrc file to make it permanent. Otherwise, it would only stay in effect until the user quit the terminal, then it would revert back.



Read here for a more in depth solution: http://www.linuxselfhelp.com/howtos/Bash-Prompt/Bash-Prompt-HOWTO-2.html



Quote:




It also supports configurable prompts - most people realize this, but
don't know how much can be done




...




The appearance of the prompt is governed by the shell variable PS1.




You can either manually enter it this way, or follow what @Requist answered and use the sudo hostname reddy command and do it the easy way (we all like easy, right? :D)


[#27765] Wednesday, July 6, 2022, 2 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
tigehanc

Total Points: 162
Total Questions: 113
Total Answers: 122

Location: Zambia
Member since Sat, Oct 31, 2020
4 Years ago
;