Re: customize bash promt to full path

2021-08-13 Thread Ekkard Gerlach
Thx to all and especially to Jack: https://urldefense.proofpoint.com/v2/url?u=http-3A__bashrcgenerator.com_=DwIDaQ=gRgGjJ3BkIsb5y6s49QqsA=gd8BzeSQcySVxr0gDWSEbN-P-pgDXkdyCtaMqdCgPPdW1cyL5RIpaIYrCn8C5x2A=1s18G4I-TMUkFYYV7_GRfJCXhhj41z_T3_4XvUqaS-o=JVAL0tewStSZNWlB6sfoqsO9QUbGyk8q1tJOZ1bhSl4=  
 displayed most common bash promt as first 
example, same like i wanted:


export PS1="\u@\h:\w\\$ \[$(tput sgr0)\]"

I inserted that to ~/.bashrc , now works! :)

Am 13.08.21 um 01:05 schrieb Jack Aboutboul:


There is also a nifty configuration that will spit out what you want 
here: https://urldefense.proofpoint.com/v2/url?u=http-3A__bashrcgenerator.com_=DwIDaQ=gRgGjJ3BkIsb5y6s49QqsA=gd8BzeSQcySVxr0gDWSEbN-P-pgDXkdyCtaMqdCgPPdW1cyL5RIpaIYrCn8C5x2A=1s18G4I-TMUkFYYV7_GRfJCXhhj41z_T3_4XvUqaS-o=JVAL0tewStSZNWlB6sfoqsO9QUbGyk8q1tJOZ1bhSl4=  


—Jack


Re: customize bash promt to full path

2021-08-12 Thread ~Stack~

On 8/12/21 5:58 PM, Ekkard Gerlach wrote:

Hello,

how can I customize the bash/ terminal promt  always

[root@arthur Desktop]#

to

[root@arthur /home/user41/Desktop]#

or root@arthur:/home/user41/Desktop#

?



Try editing your ~/.bashrc

Look for a line that looks like this:

 PS1='$\u@\h:\w\$ '

Then tack on PWD like this:

 PS1='$\u@\h:\w\$PWD$ '


That should do it or at least get you close enough that a web search can 
get you the rest of the way.


Hope that helps.
~Stack~


Re: customize bash promt to full path

2021-08-12 Thread Jack Aboutboul
The thing you want to edit is called the PS1 variable.

You can read about customizing the prompt on the Arch Wiki: 
https://urldefense.proofpoint.com/v2/url?u=https-3A__wiki.archlinux.org_title_Bash_Prompt-5Fcustomization=DwIFaQ=gRgGjJ3BkIsb5y6s49QqsA=gd8BzeSQcySVxr0gDWSEbN-P-pgDXkdyCtaMqdCgPPdW1cyL5RIpaIYrCn8C5x2A=u4gDhUnYNNGqL2Vun-01ND7r4KvFFHj0DUcYR_zvPyI=qGutwP7HutDUbdMrckcB53m5GypOCROR4NblgnCT_dM=
 

There is also a nifty configuration that will spit out what you want here: 
https://urldefense.proofpoint.com/v2/url?u=http-3A__bashrcgenerator.com_=DwIFaQ=gRgGjJ3BkIsb5y6s49QqsA=gd8BzeSQcySVxr0gDWSEbN-P-pgDXkdyCtaMqdCgPPdW1cyL5RIpaIYrCn8C5x2A=u4gDhUnYNNGqL2Vun-01ND7r4KvFFHj0DUcYR_zvPyI=SXyvPfgBAKXMN4cY3c8dSO01MrH077o56q7R_dro79s=
 

—Jack

> On Aug 12, 2021, at 18:58, Ekkard Gerlach  wrote:
> 
> Hello,
> 
> how can I customize the bash/ terminal promt  always
> 
> [root@arthur Desktop]#
> 
> to
> 
> [root@arthur /home/user41/Desktop]#
> 
> or root@arthur:/home/user41/Desktop#
> 
> ?
> 
> I waste tons of concentration or time to type dozends times "pwd" only to 
> detect that I am in the right user directory.
> 
> I know that its set in /etc/bashrc, but I don't understand how to change.
> 
> Who knows it?
> 
> tia Ekkard