LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 12-20-2006, 03:54 AM   #1
mrjeffc
LQ Newbie
 
Registered: Dec 2006
Posts: 8

Rep: Reputation: 0
How to change the hostname, ip, gateway, dns in command line fedora core 6?


Hello,
My first newbie question. Just installed Fedora Core 6, with no graphical environment, so I'm having trouble locating where I could change the hostname, ip address, dns, etc for eth0.

Any help gladly accepted.
 
Old 12-20-2006, 04:16 AM   #2
mrjeffc
LQ Newbie
 
Registered: Dec 2006
Posts: 8

Original Poster
Rep: Reputation: 0
found part of my reply..
ifconfig eth0 IPaddress
route del default
route add default gw gatewayIP
Then you need to edit /etc/resolv.conf to make it look this way:
nameserver primaryDNS
nameserver secondaryDNS

-searching for permanant hostname change in the forums
 
Old 12-20-2006, 04:18 AM   #3
raskin
Senior Member
 
Registered: Sep 2005
Location: Russia
Distribution: NixOS (http://nixos.org)
Posts: 1,899

Rep: Reputation: 68
man route
man ifconfig
man ip
man resolv.conf

or

man dhclient ...

In most cases you need simply run dhclient as root. So your ISP's computer will automatically tell your computer to use specific IP, gateway and NS. But you can read mentioned manuals to know how to set everything statically by hand.

If you are interested in second way, I can go in details.
 
Old 12-20-2006, 04:20 AM   #4
raskin
Senior Member
 
Registered: Sep 2005
Location: Russia
Distribution: NixOS (http://nixos.org)
Posts: 1,899

Rep: Reputation: 68
Oh, and hostname is set by hostname command. During boot it is read from /etc/sysconfig/network .
 
Old 12-20-2006, 04:22 AM   #5
mrjeffc
LQ Newbie
 
Registered: Dec 2006
Posts: 8

Original Poster
Rep: Reputation: 0
someone wrote: on fedora core, the hostname command won't do it permanently (goes away after reboot).
Try editing /etc/sysconfig/network

I have Fedora Core 6 and i don't have that folder "sysconfig"

where do i edit, and what do i put in it?
 
Old 12-20-2006, 04:25 AM   #6
mrjeffc
LQ Newbie
 
Registered: Dec 2006
Posts: 8

Original Poster
Rep: Reputation: 0
thanks raskin. i found it. duh. don't know why vi didn't work the first time. must have mispelled it.
 
  


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
DNS: from command line? ashlesha Linux - General 2 07-26-2006 11:35 PM
IP/DNS/Gateway Change Problems fazeaway AIX 1 09-23-2005 11:39 AM
How to boot into command line on Fedora Core 2? DeepSPiN Fedora 3 08-25-2005 01:24 AM
How To Add user in Fedora Core 4 using the Command Line Interface regnox Linux - Newbie 9 08-22-2005 01:30 AM
How to set Gateway by command line vanhelsing Linux - Networking 1 07-17-2004 12:42 PM


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