Thursday, April 25, 2024
 Popular · Latest · Hot · Upcoming
7
rated 0 times [  7] [ 0]  / answers: 1 / hits: 20349  / 1 Year ago, tue, december 20, 2022, 2:32:53

This can be really trivial,but it helps in ways of making it more comfortable while coding and sending commands to terminal.



My terminal source/bash/root name(my apologies, I dunno which is the right word), reads as follows :



itachi@itachi-HP-Pavilion-g6-Notebook-PC:~$ 


Can you please tell me how Can I shorten this or change it? The second part after '@' is too long. Is there anyway to change this.? Thanks in advance..


More From » 12.04

 Answers
1

Run the following command in a terminal to open ~/.bashrc file:



gedit ~/.bashrc


When .bashrc opens, locate and uncomment force_color_prompt=yes (remove the hash, so it no longer looks like: #force_color_prompt=yes) and change the value of PS1 in something like:



PS1='${debian_chroot:+($debian_chroot)}[033[01;32m]u@<anything-you-want>[033[00m]:[033[01;34m]w[033[00m]$ '


More about: http://www.cyberciti.biz/tips/howto-linux-unix-bash-shell-setup-prompt.html


[#30300] Tuesday, December 20, 2022, 1 Year  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
oileweaty

Total Points: 337
Total Questions: 108
Total Answers: 105

Location: Western Sahara
Member since Mon, May 3, 2021
3 Years ago
;