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 03-12-2002, 02:50 PM   #1
BrianK
Senior Member
 
Registered: Mar 2002
Location: Los Angeles, CA
Distribution: Debian, Ubuntu
Posts: 1,334

Rep: Reputation: 51
need fully qualified hostname before log-in - how?


my computer name is viking, but it needs to be viking.whatever.com (for a program I'm running). I can login as or su to root and use the hostname command, but that gets really tedious. How do I permanantly change the hostname?
 
Old 03-12-2002, 03:09 PM   #2
kill-hup
Member
 
Registered: Aug 2000
Location: NY - USA
Distribution: Slackware
Posts: 109

Rep: Reputation: 15
Since you list your distro as RedHat, it uses the value from /etc/sysconfig/network. There should be a line in that file of the form:

Code:
HOSTNAME=viking
Just change that to "viking.whatever.com" and you should be set.

Other distros do it different ways. Slackware, for instance, sets your hostname in /etc/rc.d/rc.M
using the value in /etc/HOSTNAME (assuming there is one, otherwise it provides a default) :

Code:
/bin/hostname `cat /etc/HOSTNAME | cut -f1 -d .`
To change it here, you would remove the "-d ." or the entire pipe to cut.

Hope this helps.
 
Old 03-12-2002, 03:15 PM   #3
finegan
Guru
 
Registered: Aug 2001
Location: Dublin, Ireland
Distribution: Slackware
Posts: 5,700

Rep: Reputation: 57
First add the fqdn to /etc/hosts
Also, RedHat I think stores the fqdn in /etc/sysconfig/networks

The standard used to be /etc/hostname, on Debian it still is, on Slack its /etc/HOSTNAME... poke around a bit for where it is one RedHat, hopefully someone else will just "know" and post it after me.

Cheers,

Finegan
 
Old 03-12-2002, 03:28 PM   #4
BrianK
Senior Member
 
Registered: Mar 2002
Location: Los Angeles, CA
Distribution: Debian, Ubuntu
Posts: 1,334

Original Poster
Rep: Reputation: 51
Quote:
Originally posted by kill-hup
Since you list your distro as RedHat, it uses the value from /etc/sysconfig/network.
that's exactly what I was looking for. thanks.

On that note (maybe I should have made this a new thread... in another forum, but...) On another box, I have IRIX 6.5 (it's an SGI, obviously), and have no clue how to set the gateway. I noticed that the /etc/sysconfig/network file is where the gateway information is stored in RH... anyone have any clue as to where it's stored in IRIX 6.5?
 
Old 03-12-2002, 03:43 PM   #5
finegan
Guru
 
Registered: Aug 2001
Location: Dublin, Ireland
Distribution: Slackware
Posts: 5,700

Rep: Reputation: 57
An old SGI... mmm, cool toy!

Aside from the guess that you could hand hack it with:

route add default gw xxx.xxx.xxx.xxx

I have no idea where its stored as a config. Really, post that somewhere under General and someone is bound to reply.

Cheers,

Finegan
 
Old 03-12-2002, 04:05 PM   #6
BrianK
Senior Member
 
Registered: Mar 2002
Location: Los Angeles, CA
Distribution: Debian, Ubuntu
Posts: 1,334

Original Poster
Rep: Reputation: 51
Quote:
Originally posted by finegan
An old SGI... mmm, cool toy!
yeah... a fun toy that cost $30K in '95 and gets outperformed by a $100 graphics card today. Oh well, it still does its job.

Thanks for the tip on posting in the general forum.
 
Old 03-12-2002, 04:12 PM   #7
kill-hup
Member
 
Registered: Aug 2000
Location: NY - USA
Distribution: Slackware
Posts: 109

Rep: Reputation: 15
In IRIX, I believe the routing info is stored in /etc/config/static-route.options

(for all the Solaris dudes, out there, try /etc/defaultrouter )

However, I'm not an IRIX admin - I just play one on web forums
 
Old 03-12-2002, 07:21 PM   #8
BrianK
Senior Member
 
Registered: Mar 2002
Location: Los Angeles, CA
Distribution: Debian, Ubuntu
Posts: 1,334

Original Poster
Rep: Reputation: 51
FYI: I just ran the route command (to set the default gateway on IRIX):
Code:
route add default router ip 1
 
  


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
squid FATAL: Could not determine fully qualified hostname. Please set 'visible_hostn tarakthakor Linux - Networking 5 12-04-2010 06:29 AM
hostname and fully qualified domain name setup help strimp099 Linux - Networking 7 01-14-2005 11:07 PM
sending with exim: need fully-qualified hostname otoomet Linux - Networking 1 01-06-2005 03:55 PM
squid fully qualified hostname DutchBoy Linux - Software 2 09-08-2004 11:17 PM
Fully qualified hostname gubak Linux - Newbie 8 07-24-2004 12:56 AM


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