Hi, the user@fedora in my terminal was replaced with some weird characters after the @ where it used to be fedora. Any ideas what has lead to this change, and how to get it back to user@fedora ?
Does it mean that something is broken in my System
Best regards,
its pius
A couple of things to try, to see if you can narrow down the problem. Does it happen in a terminal?
Can you try installing another type of terminal (or, you may already have xterm) and see if you still get the garbage characters?
Can you quickly create a test user, and see if that user has the same problem?
It may be that something is wrong with either the gnome-terminal (assuming you’re on a default workstation) or your account. Trying the two above suggestions may help narrow it down.
By weird characters do you mean something like #%^#$ or things like \xe6\x97\xa5\xe6 or something else?
Welcome to the fedoraproject @itspius
In Terminal after the @ it represents the Hostname. You might just messed up the hostname.
You can check (and change) if it is ok while using
hostnameclt
in therminal
(how to change man hostnamectl
)
If this is ok you can also check if the $PS1 variable is messed up with
echo $PS1
The output shoud give you something like this : [\u@\h \W]\$
Hey thanks for your tips, sorry I’m answering so late, had a lot going on between the years.
The Output hostnamectl gives me is the following
Static hostname: n/a
Transient hostname: 200116B822a023B25c65d73255591da2.dip.versatel-1u1.de
Icon name: computer-laptop
Chassis: laptop 💻
Machine ID: edd11ecfe8da4ec8b1a12dfb42151e5f
Boot ID: fd493aeb19994d55a0fc757c95608220
Operating System: Fedora Linux 37 (Workstation Edition)
CPE OS Name: cpe:/o:fedoraproject:fedora:37
Kernel: Linux 6.0.15-300.fc37.x86_64
Architecture: x86-64
Hardware Vendor: Lenovo
Hardware Model: ThinkPad T470
Firmware Version: N1QET91W (1.66 )
The output from echo $PS1 matches the output it should be according to you
That shows the system does not see a valid hostname on that machine.
Using man hostnamectl
will give you info on how to set a host name. You also could directly edit /etc/hostname and put the desired hostname into that file. (sudo will be required with either method).
Once a valid name is assigned the problem should be solved. (a reboot may be needed as well.)
Thank you, I’ve solved it by setting a Hostname in Gnome Setting > About then entering Fedora in the first Field. It’s still weird why the name got lost, but I’m glad that everything looks good again.
Thank you to everyone here for the kind support
It looks like you connected your computer direct on the device from your provider. This means you used the credentials you use normally on the router/modem, direct on the computer and created a connection over PPPoE (as example).
This way you got a transient hostname with your providers domainname.