Zsh cannot show username and hostname


I use zsh as default shell. It always works fine. A few days ago, I find zsh cannot show username and hostname. but bash can show that. I don’t know if the software modified the configuration file? How do i fix this problem?

Hello, I’m not in front of my system right now, but your config files are located in ~/.bashrc and ~/.zshrc

You can compare both files and try adding in zsh the prompt formula from bash.

You can find useful info on customizing bash and zsh on Manjaro and Arch wikis.

this is ~/.zshrc file, No useful information.

# Use powerline

# Source manjaro-zsh-configuration
if [[ -e /usr/share/zsh/manjaro-zsh-config ]]; then
source /usr/share/zsh/manjaro-zsh-config
# Use manjaro zsh prompt
if [[ -e /usr/share/zsh/manjaro-zsh-prompt ]]; then
source /usr/share/zsh/manjaro-zsh-prompt

I used the simplest method. I gave up the default theme on zsh. Although I don’t know why the default theme suddenly fails to work, I installed “oh my zsh” and changed to a theme that works normally.


here is the powerline config, powerline is a prompt for bash and zsh

This reminded me that it used"powerlevel10k" theme, I also looked at its github page, and finally found that it was due to the font. Just change the font to “konsole” and it will work normally.

This topic was automatically closed 15 days after the last reply. New replies are no longer allowed.