Very long bash prompt after upgrade from fedora 42 to 43

Hello,

After I upgrade my two fedora 42 virtual box to 43, the bash prompt changed to very long when I ssh to it, such as,

  • 08;end=863fae26-XXXX-XXXX-b297-330a959da90e;exit=success08;start=f2a4…root@localhost:~#

How to restore it to the style on fedora 42 ?
Thanks in advance.

Perlang

Welcome to Fedora @perlang.

Please have a look what kind of output you get when you type echo $PS1 in your terminal.
Is it the same long string there?

If yes have a look in the file ~/.bashrc if you can remove the string there. (.bashrc is a hidden file in /home/username/.bashrc)
It should be something like

PS1= long string  

If there is such an entry, please put a # in front of the PSI= variable to see if the prompt gets normal.
You have to reopen with ssh to see the result.

1 Like

Are you logging in via ssh as the root user? I that case, you want to look at /root/.bashrc

See:

The latest systemd (in Fedora 43) expects that it is communicating with an ANSI-standard terminal emulator, and gives weird behaviour with non-ANSI terminals.

I put my own PS1 in /root/.bashrc

export PS1="[\h \D{%a %Y%m%d-%H%M}]\n\u:\w [!]# "

that looks like:

[msi Tue 20251104-1432]
root:~ [3996]#

where “msi” is the host shortname. The [!] is what causes the current command number (3996 here) to show inside the brackets

Yes. I found that the environment $TERM, which value couldn’t be changed with command export TERM=‘’, maybe has relation with the result.
It’s always “08;end=xxxxxxxx-xxxx-xxxx-899f-xxxxxxxx0e8e;exit=success08;start=xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx;user=root;hostname=localhost;machineid=xxxxxxxxxxxx4cb99f4df0866d86fa07;bootid=xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx;pid=1111;type=shell;cwd=/root”

P.S.
It’s ok when I login console or ssh with tabby client.
Currently It’s wrong when I use SecureCRT client.

I append export PROMPT_COMMAND=
in file ~/.bashrc
the prompt is restored.

Thank ilikelinux, George, P G, and Mark for your help !

1 Like

But this resolution is not elegance, every time I type command in SecureCRT, it will echo $TERM except the command output.

Notice this(After Fedora 43 Upgrade, Bash Prompts Contains start=, end=, user=, exit=) now. Thank P G again.

I.e., they are ANSI conformant terminals …

… and this is not. Complain to them and have them fix their software.