LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices


Reply
  Search this Thread
Old 07-23-2006, 02:48 PM   #1
cylarz
Member
 
Registered: Aug 2005
Location: California
Distribution: CentOS 5
Posts: 54

Rep: Reputation: 15
how to set hostname?


Dumb dumb dumb question. Here goes...

How do I set the hostname for my entire system? I've been all over the Internet and can't seem to find a resource which will tell me this simple configuration option.

When I log in over the Net via SSH, it shows I'm logged into "localhost." Mail sent from the server also appears to come from "localhost.localdomain", and I've already double checked my postfix's main.cf file. It's fine. I think the issue must be more fundamental - something in the networking settings for the entire system.

I thought this was in /etc/hosts, but the file already looks like this...

127.0.0.1 localhost.localdomain localhost
207.xxx.xxx.xxx <mydomain.com> <mydomain>

This looks right. Did I miss something?

Thanks...
 
Old 07-23-2006, 03:13 PM   #2
rose_bud4201
Member
 
Registered: Aug 2002
Location: St Louis, MO
Distribution: Xubuntu, RHEL, Solaris 10
Posts: 929

Rep: Reputation: 30
Check out the `hostname` command. You'll have to run it as root in order to change the hostname - as a user, it just displays the system's current one.
 
Old 07-23-2006, 03:22 PM   #3
raskin
Senior Member
 
Registered: Sep 2005
Location: France
Distribution: approximately NixOS (http://nixos.org)
Posts: 1,900

Rep: Reputation: 68
/etc/sysconfig/network
?
 
Old 07-23-2006, 03:40 PM   #4
cylarz
Member
 
Registered: Aug 2005
Location: California
Distribution: CentOS 5
Posts: 54

Original Poster
Rep: Reputation: 15
re: how to set hostname?

Right after I submitted my post, I did a little more research and stumbled across the hostname command. Its man page, indeed, pointed me toward /etc/sysconfig/network, whereupon I found the setting I needed to change, then did a reboot.

Everything's fine now. Thanks to both responders for your help.
 
Old 07-23-2006, 03:42 PM   #5
cylarz
Member
 
Registered: Aug 2005
Location: California
Distribution: CentOS 5
Posts: 54

Original Poster
Rep: Reputation: 15
oh...

Rosebud, I LOVED your sig quotes. Hilarious! It's nerd humor for sure, but I patted myself on the back for actually getting all three of them. LOL
 
Old 07-23-2006, 03:48 PM   #6
Micro420
Senior Member
 
Registered: Aug 2003
Location: Berkeley, CA
Distribution: Mac OS X Leopard 10.6.2, Windows 2003 Server/Vista/7/XP/2000/NT/98, Ubuntux64, CentOS4.8/5.4
Posts: 2,986

Rep: Reputation: 45
Quote:
Originally Posted by cylarz
Rosebud, I LOVED your sig quotes. Hilarious! It's nerd humor for sure, but I patted myself on the back for actually getting all three of them. LOL
Hey! I live in Berkeley and work in Berkeley! LOL
 
  


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
How do I correctly set a hostname? MiGI Linux - Software 1 03-17-2006 05:03 PM
cannot set hostname kpachopoulos Debian 1 02-27-2006 01:13 AM
how to set the hostname? harys Ubuntu 1 02-15-2006 06:35 AM
Set hostname btexpress Linux - Networking 2 06-01-2004 01:03 AM
set hostname allelopath Linux - Software 10 04-30-2003 07:05 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 11:33 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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration