1

I'm using Ubuntu 12.04. The command prompt (username@desktop:~$) in Terminal went missing. How do I get it back? Thanks

Solved by searching. I'm just a week new to Linux.

Thank you very much Olli and Wolfgang Vogl for your quick responses and great information, but it didn't fix my problem. If I could have gained root access, which is normally done through the Terminal (where I couldn't see what I was typing), I probably could have fixed the problem by removing the "#" from the "force_color_prompt=yes" command line, and then setting the colors to whatever I wanted. I've read numerous blogs, sites, etc. about missing command prompts, and most referred to the .bashrc file which allows you to configure the color of the command prompt sections, just as Olli and Wolfgang stated.

I created a new user account, ensured that it's Terminal worked properly, and it did. Then I compared it's .bashrc file to the accounts .bashrc file that didn't work. They were the same.

I kept searching and found the solution at How to reset the terminal properties and preferences?, answered by aneeshep.

I couldn't believe how easy it was to fix. The problem was that I had changed my background theme to one of my own which also changed other sections of that user's account profile, namely the Terminal. With my background theme, I couldn't see the File, Edit, etc. menu bar for the Terminal. Also, with the Terminal not maximized, I didn't realize the menu bar at the very top of the screen was for the Terminal.

To fix it, just navigate to Edit > Profile Preferences. Select the Colors tab, and configure the colors as needed.

I've read about numerous other people having the same problem, and I'm sure they just changed their background theme. If the resolution was just a little easier to find.

I want to thank aneeshep, Olli and Wolfgang Vogl again. Thanks.

1
  • post the screenshot of your terminal. Feb 11, 2014 at 16:24

1 Answer 1

2

See this post.

The command prompt should be in PS1, you can set it by running this command:

PS1='${debian_chroot:+($debian_chroot)}\u@\h:\w\$'

If you want this to be the default when you open a new terminal, you can put it to your ~/.profile or in /etc/bash.bashrc (global for all users).

To check your current prompt, just echo it:

wolfgang@wolfgang-desktop:~$ echo $PS1
\[\e]0;\u@\h: \w\a\]${debian_chroot:+($debian_chroot)}\u@\h:\w\$

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .