Results 1 to 8 of 8

Thread: Terminal prompt reset to default

  1. #1
    Join Date
    Feb 2006
    Location
    South Africa
    Beans
    4
    Distro
    Ubuntu 10.04 Lucid Lynx

    Terminal prompt reset to default

    Guys, a friend worked on my Ubuntu system (I am a newbie) and now my terminal prompt behaves strange and looks weird. If I use the up and down arrow keys to scroll through last typed commands, I get gibberish on screen that does not work, and the prompt output is now "[\u@\H \W \@]$
    "

    How do I reset the terminal to it's default settings and behaviour? My friend did something with VI, not sure if this affects my prompt or not.

  2. #2
    Join Date
    Oct 2010
    Location
    Ontario, Canada
    Beans
    124
    Distro
    Xubuntu 12.04 Precise Pangolin

    Re: Terminal prompt reset to default

    Your friend has probably messed up your ~/.bashrc file. If you create a new user, log in as that one, it will create a new .bashrc in that user's home folder. You can copy that back to your user profile, chown it to you, log out and log in.

    For example:

    (back up first, in your normal user profile)
    Code:
    cp ~/.bashrc ~/.bashrc-backup
    (in the new user, copy the .bashrc file to somewhere like /home)
    Code:
    sudo cp ~/.bashrc /home
    (log out and in to your regular user, copy the file back to your profile)
    Code:
    sudo cp /home/.bashrc ~
    sudo chown yourusername:yourusername .bashrc
    (log out and log back in)

    That should restore a default .bashrc file

    If that all works nicely, remove the /home/.bashrc file, as it is a left over. You might also remove the ~/.bashrc-backup file, when you're sure you're happy again.
    Last edited by darkhelmetchris; October 29th, 2010 at 08:07 AM.
    "I am your father's brother's nephew's cousin's former roommate."

  3. #3
    Join Date
    Feb 2006
    Location
    South Africa
    Beans
    4
    Distro
    Ubuntu 10.04 Lucid Lynx

    Re: Terminal prompt reset to default

    Fantastic, let me try that

  4. #4
    Join Date
    Feb 2006
    Location
    South Africa
    Beans
    4
    Distro
    Ubuntu 10.04 Lucid Lynx

    Re: Terminal prompt reset to default

    Ok, not having much luck getting this done. While the logical flow makes sense to me, I suspect several detailed little steps are missing, as the new used did not have "sudoers" access etc. I cannot seem to get the .bashrc file copied from the new user to my default user. Any ideas?

  5. #5
    Join Date
    Feb 2010
    Location
    Silicon Valley
    Beans
    1,898
    Distro
    Xubuntu 12.04 Precise Pangolin

    Re: Terminal prompt reset to default

    The default .bashrc file is in /etc/skel/.bashrc. Copy that one.

    Code:
    $ cd $HOME
    $ mv .bashrc .bashrc.old
    $ cp -p /etc/skel/.bashrc .

  6. #6
    Join Date
    Oct 2010
    Location
    Ontario, Canada
    Beans
    124
    Distro
    Xubuntu 12.04 Precise Pangolin

    Re: Terminal prompt reset to default

    Quote Originally Posted by gmargo View Post
    The default .bashrc file is in /etc/skel/.bashrc. Copy that one.
    Nice, gmargo, I didn't know that's where the default one was. That's probably a better solution.

    thomas37, all your new user needed was to be a member of the "admin" group. But, I like gmargo's solution.
    "I am your father's brother's nephew's cousin's former roommate."

  7. #7
    Join Date
    Feb 2006
    Location
    South Africa
    Beans
    4
    Distro
    Ubuntu 10.04 Lucid Lynx

    Re: Terminal prompt reset to default

    Thanks guys, Gmargo's solution helped, this is now solved

  8. #8
    Join Date
    Aug 2007
    Location
    a puddle in Manchester
    Beans
    9,204
    Distro
    Ubuntu 14.04 Trusty Tahr

    Re: Terminal prompt reset to default

    Sorry wrong thread!
    MacBook Pro 10,1 retina

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •