LinuxQuestions.org
Share your knowledge at the LQ Wiki.
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-02-2006, 01:43 AM   #1
frz
LQ Newbie
 
Registered: Jul 2006
Location: Canada
Distribution: Mandriva!
Posts: 13

Rep: Reputation: 0
Question Change mathieu@LOCALHOST (the localhost)


Hi, i know its maybe ez but i dunno how to do! :P

I simply want change the localhost in the konsole (mathieu@localhost). What can i do? Thank You!

I use Mandriva!

Last edited by frz; 07-02-2006 at 01:46 AM.
 
Old 07-02-2006, 02:00 AM   #2
raskin
Senior Member
 
Registered: Sep 2005
Location: Russia
Distribution: NixOS (http://nixos.org)
Posts: 1,899

Rep: Reputation: 68
Well, /etc/sysconfig/network .. Does it contain HOSTNAME=localhost ? If yes - change from root + reboot.
 
Old 07-02-2006, 02:43 AM   #3
frz
LQ Newbie
 
Registered: Jul 2006
Location: Canada
Distribution: Mandriva!
Posts: 13

Original Poster
Rep: Reputation: 0
Smile

well.. all i got in that file is:

NETWORKING=yes

so mmm i think only root can write to that file. What can i do for be able to add HOSTNAME=army.com ?(If i must add that line)

And mm.. if i add that line, my linux will not crash or ill not got problems?
 
Old 07-02-2006, 03:27 AM   #4
raskin
Senior Member
 
Registered: Sep 2005
Location: Russia
Distribution: NixOS (http://nixos.org)
Posts: 1,899

Rep: Reputation: 68
Then add it. Surely, as root. I cannot see why you can experience any problems. Especially if you will set hostname to something that resolves to your IP (otherwise some programs (not really critical for running system, but maybe even critical for your work) will try to act as if running on the host you enter there - but oops...). At least you will not hurt you OS as to be unable to delete the line back..

But if you are afraid, you can search Control Panel . But I am not familiar with Mandriva's graphical configuration.
 
Old 07-02-2006, 01:11 PM   #5
frz
LQ Newbie
 
Registered: Jul 2006
Location: Canada
Distribution: Mandriva!
Posts: 13

Original Poster
Rep: Reputation: 0
Cool

Ok cool ty very much! Emmm... yeah i searched on control panel and i didn't found it. :P I'll try this TY!
 
Old 07-02-2006, 01:48 PM   #6
frz
LQ Newbie
 
Registered: Jul 2006
Location: Canada
Distribution: Mandriva!
Posts: 13

Original Poster
Rep: Reputation: 0
Question

Well.. i got a problem

I putted HOSTNAME=army.com

but i got: [mathieu@army ~]$


the .com is not there.. why?
 
Old 07-02-2006, 02:03 PM   #7
raskin
Senior Member
 
Registered: Sep 2005
Location: Russia
Distribution: NixOS (http://nixos.org)
Posts: 1,899

Rep: Reputation: 68
Well, read man bash and search PS1.. find where PS1 is set in your system and change \h to \H. Or
echo "$PS1"
and retype
export PS1=... (with correction)
to your .bash_profile/.bashrc (or whatever if you use another shell).
 
Old 07-03-2006, 03:54 AM   #8
frz
LQ Newbie
 
Registered: Jul 2006
Location: Canada
Distribution: Mandriva!
Posts: 13

Original Poster
Rep: Reputation: 0
Unhappy

What? lol sry dude im n00b
 
Old 07-03-2006, 04:28 AM   #9
raskin
Senior Member
 
Registered: Sep 2005
Location: Russia
Distribution: NixOS (http://nixos.org)
Posts: 1,899

Rep: Reputation: 68
Can't translate it in english.
Run:
echo "export PS1=$PS1" >>~/.bashrc
edit ~/.bashrc to change '\h' to '\H' in last line.
What's unclear?
 
Old 07-03-2006, 01:26 PM   #10
frz
LQ Newbie
 
Registered: Jul 2006
Location: Canada
Distribution: Mandriva!
Posts: 13

Original Poster
Rep: Reputation: 0
Wink Problem!!!!

I made that commands:

echo "export PS1=$PS1" >>~/.bashrc
I got nothing
edit ~/.bashrc
bash: edit: command not found


But i found what was the command. The command was:
export PS1=['\u'@'\H']
Now i got

[mathieu@army.com]

Cool ty!
 
Old 07-03-2006, 01:29 PM   #11
raskin
Senior Member
 
Registered: Sep 2005
Location: Russia
Distribution: NixOS (http://nixos.org)
Posts: 1,899

Rep: Reputation: 68
Sorry, I supposed that obviously not-a-single-command line will be interpreted more freely.. But I meant what you finally did.
 
Old 07-03-2006, 07:52 PM   #12
frz
LQ Newbie
 
Registered: Jul 2006
Location: Canada
Distribution: Mandriva!
Posts: 13

Original Poster
Rep: Reputation: 0
Angry

Damn!!! When i close and open m Konsole i got this

bash: export: `W]$': not a valid identifier
[u@h
[u@h


...
 
Old 07-03-2006, 09:04 PM   #13
frz
LQ Newbie
 
Registered: Jul 2006
Location: Canada
Distribution: Mandriva!
Posts: 13

Original Poster
Rep: Reputation: 0
Talking Solved!

:P Hahahah damn i mslow to find errors on linux! ! :P but i found the error

Ive open my bashrc (wich i found while browsing google for help.. :P) and i saw that i got 2 export :P so my sheel was fucked up when he was opened hahaha :P Ty so much for the help!! Hay i found a nice website for prompt editing! with colors and vars:

http://www-128.ibm.com/developerwork.../l-tip-prompt/

Bye bye!
 
  


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
Change localhost jdmml Fedora 10 07-02-2011 12:18 PM
Change localhost name in username@localhost n175uj Linux - Newbie 4 07-01-2005 09:25 PM
Message from syslogd@localhost localhost kernel: Disabling IRQ #21 ylts Linux - Hardware 0 02-26-2005 09:01 AM
dns requests from localhost to localhost keex Linux - Networking 2 11-13-2003 02:47 PM
Localhost change ? mikeshn Linux - General 5 11-27-2002 03:30 PM


All times are GMT -5. The time now is 04:36 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