LinuxQuestions.org
Review your favorite Linux distribution.
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 03-09-2005, 10:33 AM   #1
Runningonair
Member
 
Registered: Apr 2004
Location: London, UK
Distribution: suse 8 and 9
Posts: 30

Rep: Reputation: 15
Smile Change Netmask permanently from the Command Line


How do I change the network mask from the command line permanently. I can't get access to the desktop at the moment hence the question.

I'm running SLES8

Thanks
 
Old 03-09-2005, 10:38 AM   #2
zeropash
Member
 
Registered: Apr 2003
Location: Bangalore,India
Distribution: FC2, RHES, RH9, FC3, FC1, Slackware 3.0
Posts: 208

Rep: Reputation: 30
edit the ifcfg-eth0
in FC this is present under /etc/sysconfig/networking/devices
In SUSE I think its under
/etc/sysconfig/network/
and restart network (see man ip or man ifconfig)

Last edited by zeropash; 03-09-2005 at 10:39 AM.
 
Old 03-09-2005, 10:56 AM   #3
Runningonair
Member
 
Registered: Apr 2004
Location: London, UK
Distribution: suse 8 and 9
Posts: 30

Original Poster
Rep: Reputation: 15
Thanks,

You were bang on with the file location. I wasn't able to find out how to restart the service, which is a bit of a pain. I can restart the server of course, but I was hoping to avoid that.

If you have any ideas, let me know.
 
Old 03-09-2005, 10:58 AM   #4
susefan
Member
 
Registered: Feb 2005
Location: California, USA
Distribution: Novell SuSE
Posts: 39

Rep: Reputation: 15
ifdown eth0
ifup eth0
 
Old 03-09-2005, 11:02 AM   #5
harken
Member
 
Registered: Jan 2005
Location: Between the chair and the desk
Distribution: Debian Sarge, kernel 2.6.13
Posts: 666

Rep: Reputation: 30
You can use either ifconfig with something like 'ifconfig <your_interface_here> address <your_IP> netmask <netmask_IP> broadcast <broadcast_IP> up' or edit as root the /etc/network/interfaces file and set the netmask there.
 
Old 03-09-2005, 11:15 AM   #6
zeropash
Member
 
Registered: Apr 2003
Location: Bangalore,India
Distribution: FC2, RHES, RH9, FC3, FC1, Slackware 3.0
Posts: 208

Rep: Reputation: 30
if you do a ifdown or ifconfig down etc etc you tend to close the network connection (unless you have another card)
and you wont be able to login unless you go there and up the network (just warning as I have done that stupidity once.)
I think service network restart should be helpfull
 
  


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
how to change workspace by command line melinda_sayang Slackware 29 07-21-2011 03:51 AM
change the time from the command line juanb Linux - Newbie 3 10-31-2007 02:11 AM
Change workspace from command line 3saul Linux - Software 4 11-18-2005 06:02 PM
How to start all the services from command line permanently !! bpandey Linux - General 1 08-26-2004 12:27 AM
Can I change the console command line? coopns Linux - Newbie 3 06-16-2004 07:20 PM

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

All times are GMT -5. The time now is 03:38 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
Open Source Consulting | Domain Registration