View Full Version : [SOLVED] user@192

12th October 2017, 09:55 AM

I use F25 with the network disabled by default at start. When I start a shell it opens on user@localhost as it should but once I start the network every new shell opens on user@192 ??

Could anybody explain to me what could happened or where to look ?

Thank you

12th October 2017, 12:46 PM
Looks like it's replacing "localhost" with the IP address. You can control what the prompt looks like with a configuration which you write into .bash_profile. Giving your computer a name other than "localhost" might also make a difference, but I haven't checked that.

On a computer here there's

PS1="[\u@\h \W]$ "

in the .bash_profile which produces a prompt with the user (\u), hostname (\h), and the basename of the current directory (\W). See man bash for the details.

You can change the name of the computer using the hostnamectl command, that'll control the \h part.

12th October 2017, 01:50 PM
I wasn't aware of that command : it did the trick.
Thanks a lot ! ;)