LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 10-16-2003, 11:43 AM   #1
wedgeworth
Member
 
Registered: Aug 2003
Posts: 234

Rep: Reputation: 30
hostname stuff


i could never get my server to quite saying localhost, i know it's simple but i've already started changing config files and still haven't gotten it right. anyone got a sec to help.....?thnx
 
Old 10-16-2003, 12:09 PM   #2
synaptical
Senior Member
 
Registered: Jun 2003
Distribution: Mint 13/15, CentOS 6.4
Posts: 2,020

Rep: Reputation: 48
the info is listed in /etc/hosts, but i can't speak to the wisdom of changing it or not. i thought i read somewhere you are not supposed to once your net is set up, but maybe i am wrong about that. i guess you could try changing it and see what happened, and then just change it back if it didn't work.

> edit, oh yeah, the # netconfig command might help, too.

Last edited by synaptical; 10-16-2003 at 12:10 PM.
 
Old 10-16-2003, 12:23 PM   #3
wet foodstamp
LQ Newbie
 
Registered: Aug 2003
Posts: 2

Rep: Reputation: 0
re:hostname stuff

yo, wedge

did you try typing hostname your new hostname?

that changes your host name, but it will not keep your host name when you reboot.

if you want to make it permanent edit the hosts file (/etc/hosts) and the network file (/etc/sysconfig/network).

hope this helps.

Quote:
..those days are so far gone that i'm affended, people don't speak my name cause they get winded"
 
Old 10-16-2003, 12:41 PM   #4
wedgeworth
Member
 
Registered: Aug 2003
Posts: 234

Original Poster
Rep: Reputation: 30
ok /etc/sysconfig/network was already done. i had almost gotten /etc/hosts right. now that those two are done now what. it's still not doing anything. i even exited out and logged back in. still localhost. is there some kind of networking "reset" button. i really don't need to restart the server completely.
 
Old 10-16-2003, 02:29 PM   #5
wet foodstamp
LQ Newbie
 
Registered: Aug 2003
Posts: 2

Rep: Reputation: 0
Talking

sorry for the late reply...

cool, now try typing (as root) "hostname whatevernameyouwant"
then log out and log back in. It should work, it worked for me.
 
Old 10-16-2003, 03:23 PM   #6
wedgeworth
Member
 
Registered: Aug 2003
Posts: 234

Original Poster
Rep: Reputation: 30
thanks, that did it. the hostname command fixed it. however i am still curious if there is still some kind of command to reset all network related stuff without rebooting.
 
Old 10-16-2003, 06:12 PM   #7
bulliver
Senior Member
 
Registered: Nov 2002
Location: Edmonton AB, Canada
Distribution: Gentoo x86_64; Gentoo PPC; FreeBSD; OS X 10.9.4
Posts: 3,760
Blog Entries: 4

Rep: Reputation: 78
Quote:
however i am still curious if there is still some kind of command to reset all network related stuff without rebooting
Depending on what distro you are using...(please put it in your profile, it really does help people to help you ).. you can almost certainly just restart your network service.

On some systems it would be:
Code:
/etc/init.d/network restart
On others it might be:
Code:
/etc/rc.d/rc5.d/network restart
Basically, just have a look in your startup scripts for the network one, then if you arein theat directory do a "./network restart"

HTH
 
  


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
new to this stuff colincannon Linux - Newbie 9 06-23-2005 12:49 AM
When installing new stuff in suse 9.1, do you uninstall old stuff first? randon SUSE / openSUSE 1 12-25-2004 04:37 PM
RC.D Stuff gr33ndata Linux - Newbie 2 11-01-2003 07:08 PM
stuff you need for it to be....right Underworld Linux - General 1 10-18-2003 08:23 PM
hostname command vs. $HOSTNAME env. variable Silly22 Linux - Networking 2 03-29-2002 05:01 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

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