Red Hat This forum is for the discussion of Red Hat Linux. |
Notices |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
|
 |
06-03-2004, 08:02 AM
|
#1
|
Member
Registered: May 2004
Posts: 32
Rep:
|
hostname not staying!!
Hi everyone.
I am having a strange problem, I am trying to set the hostname of my server from the terminal after leaving an xwindows session. I tried during the gnome (using redhat 9 by the way) to set it from a command line using hostname command but it didn't work. I then init 3'ed to a terminal and directly after I set the hostname command it reflects the new setting, but after I reset the server it goes back to the old name. I am obviously logged in as root while doing this, but to no avail.
Any help would be greatly appreciated.

|
|
|
06-03-2004, 10:08 AM
|
#2
|
LQ 5k Club
Registered: Nov 2002
Location: Somewhere inside 9.9 million sq. km. Canada
Distribution: Slackware 15.0, current, slackware-arm-currnet
Posts: 6,377
|
I suspect setting the hoatname at the command line does not write it to any file. Off hand, I don't know the name of the file.
Not long after installing Linux, I installed Webmin. It comes with most distros. Once installed you access Webmin form any machine (including you own machine) on you network through a web browser. It is password protected, and you can control what each user you create can access.
You can set the hostname for your own machine through Webmin, and update the hosts file. It makes administration a lot easier. You do not have to find the files that contain the information. It is a good way to configure lots of other stuff.
I hope this helps.
|
|
|
06-04-2004, 12:31 AM
|
#3
|
Member
Registered: Feb 2004
Posts: 66
Rep:
|
you can modify /etc/sysconfig/network file and reboot so that you can change your server name.
|
|
|
06-04-2004, 01:55 AM
|
#4
|
Member
Registered: May 2004
Posts: 32
Original Poster
Rep:
|
thanks guys..
I didn't want to have to install webadmin because my ultimate goal is to do everything from a terminal, so thanks to aeolus that directory I have a feeling is going to be mighty helpful.
Me
|
|
|
06-04-2004, 02:35 AM
|
#5
|
Member
Registered: Feb 2004
Posts: 66
Rep:
|
For your goal,i can recommend you tool which is named SecureCRT
Maybe it can help you.
|
|
|
06-30-2004, 04:47 AM
|
#6
|
Member
Registered: Oct 2003
Location: Dhaka,Bangladeh
Distribution: Red Hat
Posts: 80
Rep:
|
you should add the follwoing line in /etc/hosts file
192.168.1.12 ns1.xyz.com ns1
192.168.1.12=your host ID addres
you=hostname
xyz=your domain name
Enjoy
Azim 
|
|
|
06-30-2004, 04:52 AM
|
#7
|
Member
Registered: Oct 2003
Location: Dhaka,Bangladeh
Distribution: Red Hat
Posts: 80
Rep:
|
Correction:
you should add the follwoing line in /etc/hosts file
192.168.1.12 ns1.xyz.com ns1
192.168.1.12=your host ID addres
you=hostname
xyz=your domain name
Enjoy
Azim
|
|
|
All times are GMT -5. The time now is 12:39 PM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|