even if i do ssh from some other then also it will not display correct hostname with double letters repeating but only single letter.
any consequetive double letters are always displayed as single letter.
but if u type the command "hostname" or "uname -n" then it will display the correct hostname.
can anyone plz tell if there is any solution to this ?
even if i do ssh from some other then also it will not display correct hostname with double letters repeating but only single letter.
any consequetive double letters are always displayed as single letter.
but if u type the command "hostname" or "uname -n" then it will display the correct hostname.
can anyone plz tell if there is any solution to this ?
Your correct hostname is what is displayed on running 'hostname' or 'uname -n' commands. Are you using DNS for hostname resolution? If so, then it is probably a mistake on the DNS server.
It is showing the correct hostname...................nodobout about it.
But can you see that now I am not able to see the current user (previously admin) and also the current directory (previously /usr/)
There's also a good chance that NEPTUNE is hardcoded in some profile or related login script. Hostnames don't get converted to uppercase or misspelled by design of the OS.
I was going to suggest that too, ie. the name in uppercase is a simple hard-coded string in someone's "PS1", rather than anything to do with the machine's hostname setting.
PS1 can be set in "/etc/profile", the user's ".profile", their ".bashrc", possible ".kshrc", and any other scripts they have set up to be called during login.
(Also that splitting of the prompt into 2 lines is not very pretty.)
Hey, there is nothing wrong with splitting the prompt into two lines. The first line is a "status line" and the second line is simply the prompt character. I do all of my prompts this way, mostly because drilling down into a deeply nested subdirectory leaves little room on the line to type commands!
But I would agree with the other comments..."nepttune" is the actual hostname, since that's what returns from the hostname and uname commands. If it quacks like a duck, it's a duck. The "NEPTUNE" is coming from somewhere else.
I don't like a long prompt, so I trim down the path to just the last directory name; I use:
PS1="$(uname -n):\${PWD##*/}(!)$ "
I find that is both compact and informative.
The issue with two-line prompts (for me) is that you're wasting screen lines.
If you want to get really clever, you can issue colour change directives in the prompt, or even set the window title.
But that tends to fall apart if you use a different shell or terminal emulator.