I added this command to my root .bashrc file to add color to my prompt
and to simplify its path portion to the lowest level directory,
export PS1="\e[1;31m\u@\h:\W\$\e[m "
and my bash prompt comes up ending with $ when I expected #.
Also, occasionally, when I enter a command, part of that command
becomes part of my prompt!
If the following is a prompt and command,
When I click a user name on the login screen, the other ones disappear but the password prompt never shows up. It stays this way for a few seconds, then comes back to the original state with the list of users.
I have an Ubuntu server that I administer through SSH. When I login as root I get a full path in the prompt, like /var/www . I created a user with sudo privileges for the purposes of administration. When I login with home, all I see in the command prompt is a $. Is there a fix for this?
I'm just trying to configure the primary prompt to contain the last history number and exit code of the previously executed command, seperated by a ':'(with no spaces). I tried assigining variable to PS1, but I only got it to display the exit code of the previously executed command but having problem with the history number.