LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 07-15-2010, 02:10 PM   #1
ibwood
Member
 
Registered: Jul 2010
Posts: 46

Rep: Reputation: 15
command prompt missing in terminal


Hi all,

Something unfortunate just happened. I was editing the bash file from my terminal and changed a source. After this I was no longer able to input commands for interpreting in the terminal..

In short, this doesn't show up: "user@user-laptop:$"

Any ideas? Thanks for any help.

-Ian
 
Old 07-15-2010, 02:13 PM   #2
trickykid
LQ Guru
 
Registered: Jan 2001
Posts: 24,149

Rep: Reputation: 234Reputation: 234Reputation: 234
Are you able to type at all? Which bash file, the one in your home directory (.bash_profile, .bashrc)

What specifically did you change if you can recall?
 
Old 07-15-2010, 02:19 PM   #3
ibwood
Member
 
Registered: Jul 2010
Posts: 46

Original Poster
Rep: Reputation: 15
Yes, I can type. The bash file I edited was .bashrc and since i'm using an open-source program (ROS), i'm trying to redefine the path to my packages. I changed:

"source ~/.bashrc.ros"
to
"source ~/.bashrc"

I did this because it said the location ~/.bashrc.ros didn't exist.
 
Old 07-15-2010, 02:22 PM   #4
trickykid
LQ Guru
 
Registered: Jan 2001
Posts: 24,149

Rep: Reputation: 234Reputation: 234Reputation: 234
Quote:
Originally Posted by ibwood View Post
Yes, I can type. The bash file I edited was .bashrc and since i'm using an open-source program (ROS), i'm trying to redefine the path to my packages. I changed:

"source ~/.bashrc.ros"
to
"source ~/.bashrc"

I did this because it said the location ~/.bashrc.ros didn't exist.
If you can and your .bashrc is messed up, you can try to source the file in /etc, usually /etc/bash_profile or /etc/bashrc will get you a normal prompt again. Then proceed in editing your users own .bashrc accordingly.
 
Old 07-15-2010, 02:33 PM   #5
ibwood
Member
 
Registered: Jul 2010
Posts: 46

Original Poster
Rep: Reputation: 15
Hmm, it's not working. The terminal is acting as if i'm just typing, kind of like the editing program gedit. If i press enter, it just moves to a new line without doing anything. Even if I type /etc/bashrc
 
Old 07-15-2010, 02:36 PM   #6
trickykid
LQ Guru
 
Registered: Jan 2001
Posts: 24,149

Rep: Reputation: 234Reputation: 234Reputation: 234
Quote:
Originally Posted by ibwood View Post
Hmm, it's not working. The terminal is acting as if i'm just typing, kind of like the editing program gedit. If i press enter, it just moves to a new line without doing anything. Even if I type /etc/bashrc
Open a new terminal. If you sourced it on the previous terminal, a new terminal will use the default file to source from. You can also try logging out and back in as well. Or try typing reset in the terminal and hitting enter.
 
Old 07-15-2010, 02:46 PM   #7
ibwood
Member
 
Registered: Jul 2010
Posts: 46

Original Poster
Rep: Reputation: 15
Still no luck unfortunately. Nothing is getting me anywhere.. I tried all of those things.
 
Old 07-15-2010, 02:52 PM   #8
trickykid
LQ Guru
 
Registered: Jan 2001
Posts: 24,149

Rep: Reputation: 234Reputation: 234Reputation: 234
Quote:
Originally Posted by ibwood View Post
Still no luck unfortunately. Nothing is getting me anywhere.. I tried all of those things.
Perhaps it's time to reboot into single user mode and restore the original .bashrc. Or if you are a regular user, just su (or sudo if you setup sudo) to become root to restore or create a useful .bashrc file for the user.
 
Old 07-15-2010, 03:05 PM   #9
ibwood
Member
 
Registered: Jul 2010
Posts: 46

Original Poster
Rep: Reputation: 15
But I can't use the command line.. I have a feeling I am stuck :S
 
Old 07-15-2010, 03:09 PM   #10
trickykid
LQ Guru
 
Registered: Jan 2001
Posts: 24,149

Rep: Reputation: 234Reputation: 234Reputation: 234
Quote:
Originally Posted by ibwood View Post
But I can't use the command line.. I have a feeling I am stuck :S
Nope, booting into single user mode should allow you to fix this issue. Are you logged in as root and messed up root's .bashrc? If not, ctrl-alt-F2, login to console as root, fix issue for user. If you are root with no other created users, reboot into single user mode by passing single as an option on the grub line.
 
Old 07-15-2010, 03:29 PM   #11
ibwood
Member
 
Registered: Jul 2010
Posts: 46

Original Poster
Rep: Reputation: 15
Ok, I think I got it now. Thanks again man!
 
Old 07-15-2010, 03:33 PM   #12
trickykid
LQ Guru
 
Registered: Jan 2001
Posts: 24,149

Rep: Reputation: 234Reputation: 234Reputation: 234
Quote:
Originally Posted by ibwood View Post
Ok, I think I got it now. Thanks again man!
What fixed it, just so any other users know if they end up with same type of problem? Glad it's working for you.
 
Old 07-15-2010, 03:42 PM   #13
ibwood
Member
 
Registered: Jul 2010
Posts: 46

Original Poster
Rep: Reputation: 15
All i did was press ctrl-c to cancel any tasks running in the terminal. I did try going into single-user mode and resetting first, which may have had something to do with it. But the first thing I would suggest with this problem is pressing ctrl-c.

-Ian
 
Old 07-15-2010, 03:45 PM   #14
trickykid
LQ Guru
 
Registered: Jan 2001
Posts: 24,149

Rep: Reputation: 234Reputation: 234Reputation: 234
Quote:
Originally Posted by ibwood View Post
All i did was press ctrl-c to cancel any tasks running in the terminal. I did try going into single-user mode and resetting first, which may have had something to do with it. But the first thing I would suggest with this problem is pressing ctrl-c.

-Ian
Ah so it sounds to me like you were just stuck in a process running type mode.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
terminal prompt different from console prompt dh2k Slackware 5 03-29-2010 05:38 PM
terminal (command prompt) in geexbox schneidz Linux - Distributions 1 06-23-2009 03:09 PM
Coloured command prompt everytime I open the terminal? sd9 Linux - Newbie 1 06-05-2009 01:46 AM
Terminal/command prompt has insane refresh rate, looking how to change it. Wolvenmoon Linux - Newbie 2 06-01-2006 08:12 PM
MySQL command prompt (/usr/local/mysql missing) sankar555 Linux - Software 3 03-22-2003 01:48 PM


All times are GMT -5. The time now is 07:37 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration