Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

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.

share|improve this question
    
post the screenshot of your terminal. –  Avinash Raj Feb 11 at 16:24

1 Answer 1

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 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\$
share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.