LinuxQuestions.org
Latest LQ Deal: Complete CCNA, CCNP & Red Hat Certification Training Bundle
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 09-29-2004, 08:19 AM   #1
scng
Member
 
Registered: Sep 2004
Location: Hong Kong
Distribution: Fedora Core 3
Posts: 53

Rep: Reputation: 15
changing host name


my linux box is now having the name "localhost"
how to change the host name?
and how to make the host name be ping from other machine?
 
Old 09-29-2004, 08:25 AM   #2
scuzzman
Senior Member
 
Registered: May 2004
Location: Hilliard, Ohio, USA
Distribution: Slackware, Kubuntu
Posts: 1,851

Rep: Reputation: 47
Try searching for this topic? It has been covered many times.
May want to specifically look at this thread.

Last edited by scuzzman; 09-29-2004 at 08:27 AM.
 
Old 09-29-2004, 09:19 AM   #3
scng
Member
 
Registered: Sep 2004
Location: Hong Kong
Distribution: Fedora Core 3
Posts: 53

Original Poster
Rep: Reputation: 15
thnx anyway
 
Old 09-29-2004, 10:01 AM   #4
sbrewer
Member
 
Registered: Jul 2004
Location: Huntsville, AL
Distribution: RedHat 9
Posts: 43

Rep: Reputation: 15
You can change the host name by modifying the /etc/sysconfig/network file. Change the line HOSTNAME=<your_host_name>. That should do it.
 
Old 10-01-2004, 11:59 PM   #5
scng
Member
 
Registered: Sep 2004
Location: Hong Kong
Distribution: Fedora Core 3
Posts: 53

Original Poster
Rep: Reputation: 15
excuse me, i have exec the hostname cmd (my proposed name is "neozeon"): hostname neozeon, amended /etc/sysconfig/network with

HOSTNAME=neozeon

and rebooted the machine

however i still cant ping the host neozeon from a client comp, the client said: unknown host, but i can ping with neozeon's ip.
 
Old 10-02-2004, 08:00 AM   #6
chrism01
LQ Guru
 
Registered: Aug 2004
Location: Sydney
Distribution: Centos 6.9, Centos 7.3
Posts: 17,356

Rep: Reputation: 2367Reputation: 2367Reputation: 2367Reputation: 2367Reputation: 2367Reputation: 2367Reputation: 2367Reputation: 2367Reputation: 2367Reputation: 2367Reputation: 2367
You need to add an entry to
/etc/hosts
with the name and ip address. Just follow the entry for localhost which is already there. (You need to be root for this).
 
Old 10-02-2004, 10:48 PM   #7
scng
Member
 
Registered: Sep 2004
Location: Hong Kong
Distribution: Fedora Core 3
Posts: 53

Original Poster
Rep: Reputation: 15
ah...... i should amend my question that i even cant ping 192.168.0.1 at 192.168.0.1?!

there should be sth else wrong.
 
Old 10-02-2004, 11:33 PM   #8
scng
Member
 
Registered: Sep 2004
Location: Hong Kong
Distribution: Fedora Core 3
Posts: 53

Original Poster
Rep: Reputation: 15
i should add sth to my question. i guess the "iptable" has forbidden ping, but, i dun know how to check.
 
Old 10-03-2004, 12:16 AM   #9
SimonT
Member
 
Registered: Oct 2004
Posts: 33

Rep: Reputation: 15
Are you allowed to give your machine a TLD extension eg mypc.com I have a dns entry for the machien as mypc.com on my inturnal network butin my networking control pannel it would not allow me to add .com after the name can I hack the /etc/sysconfig/network file and set it there ?
 
Old 10-03-2004, 01:04 AM   #10
happen23
LQ Newbie
 
Registered: May 2004
Location: Harbin
Posts: 13

Rep: Reputation: 0
run this
hostname yourname
 
Old 10-03-2004, 06:36 AM   #11
scuzzman
Senior Member
 
Registered: May 2004
Location: Hilliard, Ohio, USA
Distribution: Slackware, Kubuntu
Posts: 1,851

Rep: Reputation: 47
Quote:
Originally posted by scng
i should add sth to my question. i guess the "iptable" has forbidden ping, but, i dun know how to check.
issue this command sequence to shut down iptables:
Code:
$ su - 
Password:
# service iptables stop
 
  


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
Changing host Name velan Red Hat 4 09-28-2004 11:07 PM
Changing host name jonathanztaub Red Hat 3 05-03-2004 03:14 AM
changing host name needforspeed Linux - Software 1 02-28-2004 11:44 AM
changing host name hoffman Linux - Newbie 3 11-22-2003 02:16 AM
Changing Host name coolamit78 Linux - General 2 10-04-2003 12:18 AM


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