2

I remotely SSH login as root (using PUTTY),

The bash shell prompt becomes:

[root@yukiko /]#

When I entered:

getent passwd

The first line I see is this one:

root:x:0:0:root:/root:/bin/bash

Shouldn't the bash shell prompt look like this? (which corresponds to the first line in /etc/passwd) ?

[root /]#

This is a VPS server with CentOS installed, yukiko is the desired customer login id I provided to the hosting company.

  • In this case yukiko is the machine's name. – Chris Nava Feb 7 '10 at 2:54
5

If you type:

echo $PS1

at the Bash prompt, you'll see:

[\u@\h \w]

That says to display the username, an at sign, the hostname and the current working directory all inside square brackets.

Evidently, they've given your server the same hostname as your customer login ID.

  • Yes, you are right, I get this: [\u@\h \W]\$ – bobo Feb 7 '10 at 2:02

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.