So I just installed Zsh, and it shows for each command arrow and then ~. How do I enable my username@computername or something similar? I am reading https://wiki.archlinux.org/index.php/zsh but cannot figure this out.
That's how it looks now:
So I just installed Zsh, and it shows for each command arrow and then ~. How do I enable my username@computername or something similar? I am reading https://wiki.archlinux.org/index.php/zsh but cannot figure this out.
That's how it looks now:
The prompt is configured in your ~/.zshrc
file setting the variable PROMPT
. For example, to have your username and host followed by a "dynamic" %
:
~ PROMPT="%n@%m%# "
romano@samsung-romano%
The whole set of customization is available in the, as ever, wonderful Arch documentation.
Anyway, I warmly advise the usage of liquidprompt --- notice that once installed it will install a mechanism to control the prompt so that changing the PROMPT
variable will not work anymore.
I know this is an old question but I may help you understand what had happened here.
By the picture you attached, it looks like you had installed Oh My Zsh on your machine.
You could have:
https://github.com/ohmyzsh/ohmyzsh/wiki/Themes
In order to enable a theme, set ZSH_THEME to the name of the theme in your ~/.zshrc, before sourcing Oh My Zsh; for example: ZSH_THEME=robbyrussell If you do not want any theme enabled, just set ZSH_THEME to blank: ZSH_THEME=""
ZSH_THEME="agnoster"
Open up a terminal and type:
nano ~/.bashrc
Then copy the code and paste at the end of the file.
export PS1="\u@\h \[$(tput sgr0)\]"
Save and exit by pressing CTRL X Y and Enter.
Finally, type source ~/.bashrc
and you will be able to see the changes.