pgpb.padilla
pgpb.padilla

Reputation: 2418

Weird string on OS X Terminal prompt prefix ($PS1)

I have recently noticed that I get weird prompt prefix strings when I open the Terminal, for example: ilcdtl57gy784w:~ username$.

I can trace back the value to /etc/bashrc, I can see that $PS1=\h:\W \u\$ but I don't remember explicitly setting that value. Is that due to some update? Or could that be some security vulnerability.

Has anybody experience this sort of behavior?

Upvotes: 0

Views: 201

Answers (1)

PressingOnAlways
PressingOnAlways

Reputation: 12356

that string is your hostname. Your computer is getting a weird name (probably assigned from DHCP) and that is what you're seeing. You can change \h in $PS1=\h:\W \u\$ to something else if you want to hardcode the string there.

Upvotes: 1

Related Questions