LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
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, 12: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 12:46 AM.
 
Old 07-02-2006, 01:00 AM   #2
raskin
Senior Member
 
Registered: Sep 2005
Location: France
Distribution: approximately NixOS (http://nixos.org)
Posts: 1,900

Rep: Reputation: 69
Well, /etc/sysconfig/network .. Does it contain HOSTNAME=localhost ? If yes - change from root + reboot.
 
Old 07-02-2006, 01: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, 02:27 AM   #4
raskin
Senior Member
 
Registered: Sep 2005
Location: France
Distribution: approximately NixOS (http://nixos.org)
Posts: 1,900

Rep: Reputation: 69
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, 12: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, 12: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, 01:03 PM   #7
raskin
Senior Member
 
Registered: Sep 2005
Location: France
Distribution: approximately NixOS (http://nixos.org)
Posts: 1,900

Rep: Reputation: 69
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, 02: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, 03:28 AM   #9
raskin
Senior Member
 
Registered: Sep 2005
Location: France
Distribution: approximately NixOS (http://nixos.org)
Posts: 1,900

Rep: Reputation: 69
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, 12: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, 12:29 PM   #11
raskin
Senior Member
 
Registered: Sep 2005
Location: France
Distribution: approximately NixOS (http://nixos.org)
Posts: 1,900

Rep: Reputation: 69
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, 06: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, 08: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



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

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 06:25 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
Open Source Consulting | Domain Registration