LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 06-01-2002, 11:13 PM   #1
DeadPuddle
Member
 
Registered: Mar 2002
Location: Asheville, NC
Distribution: Debian
Posts: 257

Rep: Reputation: 30
Exclamation Unclear on Hostnames


What is the purpose of a hostname? What is the hostname format? Thanks.
 
Old 06-02-2002, 12:23 AM   #2
Psycho
Member
 
Registered: Feb 2002
Location: Carson City, Nevada
Distribution: Gentoo / SuSE 9.1 Pro (both A64)
Posts: 159

Rep: Reputation: 30
The hostname is your computer name.

If you had Apache running and had another PC on a LAN, the other PC would be able to browse your web page with
Code:
http://your_computer_name
It's also used to be able to connect to your computer for NFS shares (network file system) or Samba shares (smb, Server message block I believe, that's what windoze uses).

The full hostname is hostname.domain_name, localdomain for the majority of folks, or you can use the 'workgroup' name if you're on a lan with windoze boxen. Or the NT domain if you're sharing the LAN with an NT domain. Or you can just make up a domain name, just leave the .com or .org off just to be safe.

<edit>Special characters should be avoided except for a dash, and computer names are limited to 15 characters in the Windoze world. I don't know what the maximum length is for a 'Nix box'.</edit>

hth

Last edited by Psycho; 06-02-2002 at 12:28 AM.
 
Old 06-02-2002, 01:02 AM   #3
DeadPuddle
Member
 
Registered: Mar 2002
Location: Asheville, NC
Distribution: Debian
Posts: 257

Original Poster
Rep: Reputation: 30
So, computer name=Darren, workgroup=workgroup, therefore, hostname=darren.workgroup?
 
Old 06-02-2002, 02:22 AM   #4
Psycho
Member
 
Registered: Feb 2002
Location: Carson City, Nevada
Distribution: Gentoo / SuSE 9.1 Pro (both A64)
Posts: 159

Rep: Reputation: 30
Could be, assuming there's windows boxen in the workgroup workgroup. You could set your domain to workgroup in the control panel - network thingy assuming you're using KDE. Back when I was monkeying with RH I used linuxconf for setting that stuff. I don't even know how to set the domain using Libranet. Mine's probably localdomain, but no more than I'm networking I don't even worry about it anymore.

But yeah, then your hostname would be darren.workgroup and that's usually alaised back to just darren in your hosts file. hosts only applies if you're using static (assigned) IPs. If you're using dhcp on the lan, then you're ahead of me.

There's only 4 PCs on my lan so I just assigned them.

With a little luck someone will jump in here tomorrow and explain it better than I have
 
Old 06-02-2002, 03:07 AM   #5
DeadPuddle
Member
 
Registered: Mar 2002
Location: Asheville, NC
Distribution: Debian
Posts: 257

Original Poster
Rep: Reputation: 30
Well, I'm not doing it for networking purposes. I get my connection (cable modem) through a LAN. All the other PCs run Microshaft though. But if I'm getting errors, need to fix it.
 
Old 06-02-2002, 03:15 AM   #6
DeadPuddle
Member
 
Registered: Mar 2002
Location: Asheville, NC
Distribution: Debian
Posts: 257

Original Poster
Rep: Reputation: 30
Yes, I am configured for DHCP at boot.
 
Old 06-02-2002, 04:39 AM   #7
Chooco
Member
 
Registered: May 2002
Location: Mexico
Distribution: Slackware
Posts: 118

Rep: Reputation: 15
the hostname doesn't seem to make any sense to me, why would each computer need it's own hostname if it is not defined as part of the "network", i took my Linksys router off because it's a piece of crap and put a hub on....so my Linux box has a different IP than my Windows box is...
they can't connect to each other as part of the same network so why does it not even attempt to use my ethernet card if i don't have a host name?
 
Old 06-02-2002, 06:17 AM   #8
DavidPhillips
LQ Guru
 
Registered: Jun 2001
Location: South Alabama
Distribution: Fedora / RedHat / SuSE
Posts: 7,163

Rep: Reputation: 58
I think we are confusing some different issues here.

What is the problem you are having?
 
Old 06-02-2002, 07:09 AM   #9
Noerr
Member
 
Registered: May 2002
Location: Dalec, HU
Distribution: Redhat 7.3
Posts: 696

Rep: Reputation: 30
easiest way to change hostname is to run
hostname MynewName
but that won't stay until next reboot
 
Old 06-02-2002, 09:10 AM   #10
DavidPhillips
LQ Guru
 
Registered: Jun 2001
Location: South Alabama
Distribution: Fedora / RedHat / SuSE
Posts: 7,163

Rep: Reputation: 58
1.

echo yourhostname > /etc/HOSTNAME

2.

/etc/sysconfig/network
HOSTNAME=yourhostname

3.

/bin/hostname yourhostname
 
  


Reply



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 On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Monitor picture unclear on Linux..?!!!! 1957hemi Linux - Hardware 10 11-07-2004 11:33 AM
Problems with ALSA and OSS. Sound working but very unclear and irregular Canaris Linux - Hardware 5 07-21-2004 12:17 AM
Kopete configuration unclear in RH9 after rpm install corso64 Linux - Newbie 1 06-10-2004 01:11 PM
Boot fails while checks unclear file systems dominant Linux - Newbie 4 04-20-2004 02:40 PM
Unclear on DSL compatibility... and more... slakmagik Linux - General 8 03-12-2003 02:13 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

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