LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
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-12-2008, 10:06 AM   #1
delshere
LQ Newbie
 
Registered: Jul 2008
Posts: 3

Rep: Reputation: 0
Angry terminal


I have fedora 7 installed and I tried a ubuntu live cd and now my terminal says bill@ubuntu instead of bill@fedora and it is driving me nuts. I even tried reinstalling fedora and no luck still says ubuntu. Thanks in advance.
 
Old 07-12-2008, 10:28 AM   #2
alan_ri
Senior Member
 
Registered: Dec 2007
Location: Croatia
Distribution: Debian GNU/Linux
Posts: 1,733
Blog Entries: 5

Rep: Reputation: 127Reputation: 127
Welcome to LQ!
I wonder how did that happend.
Anyway,change a name in /etc/hostname file or similar(I'm not using Fedora)and that should do it.You may also want to change your hostname like this;
Code:
$hostname fedora
but that will only work untill you restart your machine.

Last edited by alan_ri; 07-12-2008 at 10:31 AM.
 
Old 07-12-2008, 11:09 AM   #3
rikijpn
Member
 
Registered: Jun 2007
Location: Japan
Distribution: Debian lenny, DSL, Solaris 10
Posts: 157

Rep: Reputation: 33
shell

Hey.
Yes, that sounds strange enough. What a appears in your terminal as your "prompt" is what a variable called PS1 gives (a variable in your shell, bash right?). If you only want to change your prompt, then just changing this variable would be enough. You could try:
Code:
PS1=I_M_SO_COOL$
which would give you a new I_M_SO_COOL$ prompt (of course you can change this to whatever you like).

But of course, it is strange enough to have your prompt changed in the way you are saying.
You could try
Code:
echo $PS1
to check if your hostname is really being used (which probably will...).
and/or check
Code:
echo $HOSTNAME
which will return the name of your host. If this was changed for whatever reason, you should change it back, as alan_ri says, by changing your host's name again. You should search for whatever file sets that variable, and change it. According to your distribution, the file where this file will be differs a bit, but I think it should be in /etc directory. So if the file is not /etc/hostname, you might
Code:
cd /etc; search -name "host*"
to search related files, and if you find somewhere written ubuntu, just change it to fedora or whatever name you like.
 
Old 07-12-2008, 12:52 PM   #4
mrrangerman
Member
 
Registered: Oct 2007
Location: MI
Distribution: Debian Slackware
Posts: 528

Rep: Reputation: 50
What did you do to make this happen? It didn't just happen on its own, did you happen to click on the little icon that says something like Install Ubuntu? Did you happen to check the Ubuntu cd to make sure it wasn't altered when downloading it, before you burned an image?
 
Old 07-12-2008, 01:04 PM   #5
delshere
LQ Newbie
 
Registered: Jul 2008
Posts: 3

Original Poster
Rep: Reputation: 0
Angry rikijpn

I did want you said the echo $hostname returned /u@/h/W/$ so ubuntu is still in there. Checked in hosts and fedora is in there so its not in hosts. When I echo PS1 it only works till I reboot. Then its back to Ubuntu. Any other thing you can think of let me know. Thanks
 
Old 07-12-2008, 01:27 PM   #6
rikijpn
Member
 
Registered: Jun 2007
Location: Japan
Distribution: Debian lenny, DSL, Solaris 10
Posts: 157

Rep: Reputation: 33
search the web/forums first

/u@/h/W/$ on PS1 means it will put your /u = username, h = hostname, W = working directory, and of course the familiar $.
So yes, effectively your hostname is the problem.

As says here
http://www.linuxquestions.org/questi...core-2-268786/ (I recommend you search the web/forums everytime you get a clue of how to fix stuffs)
apparently in fedora core 2 there is a file called /etc/sysconfig/network in which the HOSTNAME is set(changing this would "fix" the problem). I don't know whether it's the same in your version or not, but you should check if the file exists or what. If it does, then problem fixed.
If it doesn't, then you could google around searching for something like "fedora 7 hostname", which will probably give you some good answer.

If you still get problems with this, then you could just put HOSTNAME=name_i_like in your .bashrc or .bash_profile file, which would fix it... but it's kind of an ugly solution.

Last edited by rikijpn; 07-12-2008 at 01:32 PM. Reason: your host is set correct? woh... then I'm just lost...
 
Old 07-12-2008, 03:00 PM   #7
mrrangerman
Member
 
Registered: Oct 2007
Location: MI
Distribution: Debian Slackware
Posts: 528

Rep: Reputation: 50
Can you tell us what you did! If there is a bug in this it would be good to know about, and report if need be.
I have never seen a live-cd of anykind kind do what you say has happened. You say you reinstalled fedora, did you do a fresh install or just a system restore?
 
Old 07-12-2008, 03:33 PM   #8
delshere
LQ Newbie
 
Registered: Jul 2008
Posts: 3

Original Poster
Rep: Reputation: 0
Unhappy mrrangerman

Quote:
Originally Posted by mrrangerman View Post
Can you tell us what you did! If there is a bug in this it would be good to know about, and report if need be.
I have never seen a live-cd of anykind kind do what you say has happened. You say you reinstalled fedora, did you do a fresh install or just a system restore?

What I did is run a live kde cd of Ubuntu after I ran it from the cd. I booted back to hard drive where Fedora 7 is and now the host name say bill@ubuntu instead of bill@fedora at the prompt. I tried reinstalling Fedora 7 and even ran fedora format and ubuntu is still there. It just driving me nuts seeing it. Any help, Thanks
 
  


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
How do I resize the terminal window from the command line in the gnome terminal QuIcKSpArK Linux - Newbie 5 04-21-2012 03:04 PM
not screen-blanking in terminal - what sets the idle timeout on monitor for terminal stardotstar Linux - Hardware 2 08-14-2011 06:46 AM
making a script that opens terminal and enter commands into that terminal Cinematography Linux - General 8 12-16-2008 11:34 AM
Switching back to the Mandrake 9.1 desktop from terminal rdesktop terminal session marc218 Linux - General 6 02-08-2007 03:45 PM
How to launch an app in terminal, & keep it running after I close terminal? kornerr Linux - General 7 06-24-2006 06:54 PM


All times are GMT -5. The time now is 04:45 PM.

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