LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Fedora (https://www.linuxquestions.org/questions/fedora-35/)
-   -   Bit of a thick question (https://www.linuxquestions.org/questions/fedora-35/bit-of-a-thick-question-254294/)

Slinky 11-13-2004 06:35 AM

Bit of a thick question (re localhost name change)
 
Hi i have been trying to change just the name of my pc so that its dave@nameiwant instead of dave@localhost.localdomain is there any possible way to do this with out messing my box up? i have googled and tried various sujjestions but none seem to work i always get some kind of error, i have tried the following:
Changing contents of etc/sysconfig/network:
HOSTNAME=localhost.localdomain to HOSTNAME=nameiwant.localdomain (this brings up a error when logging into gnome about not finding domain name server)
also tried HOSTNAME=localhost.localdomain nameiwant (this brought up tonnes of errors lol)

I have a stand alone pc running fc3, any help would be most welcome.

crm 11-13-2004 07:17 AM

ok... this one is trickey as there are several files in /etc/that need editing. bare in mind this has worked fine for me, but it might not work fo you..

first off... your domain name needs to be .local
ill paste the files you need to look at... for rwefrence my machene is rollright.coreline.local

then.. This should be in a file called /etc/hosts
Code:

127.0.0.1 rollright.coreline.local rollright localhost
your.ip.adress.here rollright.coreline.local rollright

this should be in a file called /etc/resolv.conf
Code:

nameserver 192.168.9.11
nameserver 192.168.9.33
search coreline.local

i think theres an environment verrible that needs editing aswell

if the above dosent work, try erchning this site for the problem, i got my solution for here so the trheds are stil larround somewhere

Boby 11-13-2004 07:19 AM

This worked for me, try it out ;)

You have to change in /etc/sysconfig/networl the name after "HOSTNAME=". Then you write in /etc/hosts once the complete name and once without the domainsuffix [the part before the first dot].

Code:

[boby@space boby]$ hostname
space

Code:

[boby@space boby]$ cat /etc/sysconfig/network
NETWORKING=yes
HOSTNAME=space

Code:

[boby@space boby]$ cat /etc/hosts
# Do not remove the following line, or various programs
# that require network functionality will fail.
127.0.0.1      localhost.localdomain  localhost
213.164.252.212          space.localdomain      space

Hope this helped!
Boby

Slinky 11-13-2004 07:24 AM

thanks for your replys will give em a go and post back how i get on! :)

Slinky 11-13-2004 07:47 AM

hi sorry to bother u again but how can i find out my ip addy i did netstat -r and this is what i got:
[root@localhost ~]# netstat -r
Kernel IP routing table
Destination Gateway Genmask Flags MSS Window irtt Iface
10.0.0.0 * 255.255.255.0 U 0 0 0 eth0
169.254.0.0 * 255.255.0.0 U 0 0 0 eth0
default 10.0.0.2 0.0.0.0 UG 0 0 0 eth0
[root@localhost ~]#

XavierP 11-13-2004 08:02 AM

The command ifconfig (you may need to su to root first) will give your ip details.

Boby 11-13-2004 08:04 AM

Quote:

ifconfig
and search for inet addr: xxx.xxx.xxx.xxx

...this is if I understand your question ;)

Boby

EDIT: And again someone is replying faster than me :rolleyes:

Slinky 11-13-2004 08:04 AM

edit

Slinky 11-13-2004 08:10 AM

so my ip addy is 10.0.0.10? have set it to that in ect/hosts and everything seems ok
My one concern being that i dont have a static ip addres will this afect anything?



everything seems to be ok thankyou for all your help :)

pandasonic 11-13-2004 12:50 PM

hey

an easier way to change the localhost.localdomain to the name you want is by going to Applications / System Settings / Network / DNS - and change your Hostname there... that's under GNOME on FC3

hope that helps

Thanks


All times are GMT -5. The time now is 06:24 PM.