LinuxQuestions.org
Review your favorite Linux distribution.
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
 
LinkBack Search this Thread
Old 07-28-2005, 04:26 PM   #1
IPDreams
LQ Newbie
 
Registered: Jul 2005
Location: MS
Posts: 11

Rep: Reputation: 0
How do I edit /etc/sysconfig/network


Im trying to change my computer name - fedora 4 gave it a default name of root@laptop-ceo. I found a tread that tells me to change the /etc/sysconfig/network file - well I have tried to figure out how to edit with no success... any advise?
 
Old 07-28-2005, 04:32 PM   #2
tuxdev
Senior Member
 
Registered: Jul 2005
Distribution: Slackware
Posts: 2,008

Rep: Reputation: 110Reputation: 110
/etc/hosts,/etc/HOSTNAME?
 
Old 07-28-2005, 04:42 PM   #3
IPDreams
LQ Newbie
 
Registered: Jul 2005
Location: MS
Posts: 11

Original Poster
Rep: Reputation: 0
Umm. i tried that and it gave me this... (man Im such a noob)

[root@laptop-ceo /]# cd /
[root@laptop-ceo /]#
[root@laptop-ceo /]# cd /etc/host,/etcHOSTNAME=IPDreams
bash: cd: /etc/host,/etcHOSTNAME=IPDreams: No such file or directory
[root@laptop-ceo /]# cd etc/host
bash: cd: etc/host: No such file or directory
[root@laptop-ceo /]# pwd
/
[root@laptop-ceo /]# cd etc/hostname
bash: cd: etc/hostname: No such file or directory
[root@laptop-ceo /]#
[root@laptop-ceo /]# /etc/host,/HOSTNAME=IPDreams
bash: /etc/host,/HOSTNAME=IPDreams: No such file or directory
[root@laptop-ceo /]# pwd
/
[root@laptop-ceo /]# cd /etc
[root@laptop-ceo etc]# host
Usage: host [-aCdlriTwv] [-c class] [-N ndots] [-t type] [-W time]
[-R number] hostname [server]
-a is equivalent to -v -t *
-c specifies query class for non-IN data
-C compares SOA records on authoritative nameservers
-d is equivalent to -v
-l lists all hosts in a domain, using AXFR
-i IP6.INT reverse lookups
-N changes the number of dots allowed before root lookup is done
-r disables recursive processing
-R specifies number of retries for UDP packets
-t specifies the query type
-T enables TCP/IP mode
-v enables verbose output
-w specifies to wait forever for a reply
-W specifies how long to wait for a reply
-4 use IPv4 query transport only
-6 use IPv6 query transport only
[root@laptop-ceo etc]#
[root@laptop-ceo etc]# hosts
bash: hosts: command not found
[root@laptop-ceo etc]#
[root@laptop-ceo etc]# /etc/hostname IPDreams


What specificly do I need to type.. thank you!
 
Old 07-28-2005, 04:42 PM   #4
byte.chaser
Member
 
Registered: Jun 2004
Distribution: debian 3.1 etch
Posts: 76

Rep: Reputation: 15
Re: How do I edit /etc/sysconfig/network

Quote:
well I have tried to figure out how to edit with no success... any advise?
I assume you mean what program to use
?
you can try
Code:
 nano /etc/sysconfig/network
OR
Code:
pico /etc/sysconfig/network
either one should be on your system. Both are run from the command line
just open a terminal.
i use nano and pico usually, vi i'm learning, another "obscure" editor

Last edited by byte.chaser; 07-28-2005 at 04:49 PM.
 
Old 07-28-2005, 04:47 PM   #5
jrdioko
Member
 
Registered: Oct 2002
Distribution: Debian 6.0.2 (squeeze)
Posts: 944

Rep: Reputation: 30
To view the other files suggested, type the following:

Code:
pico /etc/hosts
pico /etc/HOSTNAME
Capitalization matters.
 
Old 07-28-2005, 05:01 PM   #6
IPDreams
LQ Newbie
 
Registered: Jul 2005
Location: MS
Posts: 11

Original Poster
Rep: Reputation: 0
getting closer

well i changed it in the file.. but when in the CLI it still shows up as the old hostname.. also thanks for connecting some dots for me!!
 
Old 07-28-2005, 05:03 PM   #7
byte.chaser
Member
 
Registered: Jun 2004
Distribution: debian 3.1 etch
Posts: 76

Rep: Reputation: 15
Re: getting closer

Quote:
Originally posted by IPDreams
well i changed it in the file.. but when in the CLI it still shows up as the old hostname.. also thanks for connecting some dots for me!!
in which file ?

/etc/hosts

OR


/etc/HOSTNAME

OR


/etc/sysconfig/network
 
Old 07-28-2005, 05:05 PM   #8
jrdioko
Member
 
Registered: Oct 2002
Distribution: Debian 6.0.2 (squeeze)
Posts: 944

Rep: Reputation: 30
As a side note, take a look at this page. That will help you learn to move around and change things on the command line.
 
Old 07-28-2005, 05:09 PM   #9
IPDreams
LQ Newbie
 
Registered: Jul 2005
Location: MS
Posts: 11

Original Poster
Rep: Reputation: 0
all off them.. and it still shows up with the default..

I even went back to confirm the changes saved and they did...

PS - /etc/HOSTNAME has nothing in it

[root@laptop-ceo /]# nano /etc/hosts
[root@laptop-ceo /]#
[root@laptop-ceo /]# hostname
laptop-ceo.expetel.com
[root@laptop-ceo /]# nano /etc/hosts
[root@laptop-ceo /]#
[root@laptop-ceo /]# nano /etc/HOSTNAME
[root@laptop-ceo /]#
[root@laptop-ceo /]# hostname
laptop-ceo.expetel.com
[root@laptop-ceo /]#
 
Old 07-28-2005, 05:12 PM   #10
byte.chaser
Member
 
Registered: Jun 2004
Distribution: debian 3.1 etch
Posts: 76

Rep: Reputation: 15
Quote:
Originally posted by IPDreams
all off them.. and it still shows up with the default..

I even went back to confirm the changes saved and they did...

PS - /etc/HOSTNAME has nothing in it

[root@laptop-ceo /]# nano /etc/hosts
[root@laptop-ceo /]#
[root@laptop-ceo /]# hostname
laptop-ceo.expetel.com
[root@laptop-ceo /]# nano /etc/hosts
[root@laptop-ceo /]#
[root@laptop-ceo /]# nano /etc/HOSTNAME
[root@laptop-ceo /]#
[root@laptop-ceo /]# hostname
laptop-ceo.expetel.com
[root@laptop-ceo /]#

hmmmmm sounds like you may not have the program nano ... nano is kinda like notepad for windows...

just the command "nano" should open up an editor like screen withh what may look like gobbledie-gook from you view point

pico is another similar editor

vi is yet another ( great but again obscure)

joe is another one

when you type nano /etc/hosts

the file hosts in the /etc directory should open in... nano

try joe or pico in place of nano...

Last edited by byte.chaser; 07-28-2005 at 05:19 PM.
 
Old 07-28-2005, 05:15 PM   #11
IPDreams
LQ Newbie
 
Registered: Jul 2005
Location: MS
Posts: 11

Original Poster
Rep: Reputation: 0
na I have nano.. it looks like this now that I have edited it and saved it..

see below I change the hostname to IPDreams.. let me try a re-boot

# Do not remove the following line, or various programs
# that require network functionality will fail.
127.0.0.1 root.IPDreams IPDreams





[ Read 3 lines ]
^G Get Help ^O WriteOut ^R Read File ^Y Prev Page ^K Cut Text ^C Cur Pos
^X Exit ^J Justify ^W Where Is ^V Next Page ^U UnCut Txt ^T To Spell
 
Old 07-28-2005, 05:21 PM   #12
byte.chaser
Member
 
Registered: Jun 2004
Distribution: debian 3.1 etch
Posts: 76

Rep: Reputation: 15
hmm ok, never had to change that before but if it still doesnt change try this command

Code:
host IPDreams
OR

Code:
hostname IPDreams
just like that no file editing.

cant remember which works i know one will give "not found" or simillar
 
Old 07-28-2005, 05:26 PM   #13
IPDreams
LQ Newbie
 
Registered: Jul 2005
Location: MS
Posts: 11

Original Poster
Rep: Reputation: 0
THANKS!

THANK you all for your post.. reboot made all the changes I made in nano take effect
 
Old 07-28-2005, 06:17 PM   #14
byte.chaser
Member
 
Registered: Jun 2004
Distribution: debian 3.1 etch
Posts: 76

Rep: Reputation: 15
good to hear.
take a good look at the site jrdioko posted REALLY good info there.
 
Old 07-28-2005, 07:32 PM   #15
Boow
Member
 
Registered: Feb 2004
Distribution: Slackware 10.2
Posts: 669

Rep: Reputation: 32
you could of just logged out and backin. the only time you might reboot is if you compile another kernel.
 
  


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
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
/etc/sysconfig/network does not exist! Lechium Linux - Newbie 1 06-21-2004 05:18 PM
Where is the SuSE 9.0 /etc/sysconfig/network file? hnash53 Linux - Networking 1 02-07-2004 03:54 PM
/etc/sysconfig/network reboot? PlatinumRik Linux - Newbie 3 05-21-2003 02:16 PM
/etc/sysconfig/network ssrikant Linux - Software 1 05-18-2003 03:30 PM
/etc/sysconfig/network-scripts on Solaris? meshcurrent Solaris / OpenSolaris 6 11-24-2002 01:51 AM


All times are GMT -5. The time now is 10:53 AM.

Main Menu
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