How to disable DHCP

Assuming one network card on eth0.

Type 'setup' as root, then 'network' in the menu from terminal. I think setup is rh thing...so will not work from distro to distro

Or you can do it manual , in a text file. I believe the path is:

/etc/sysconfig/network-scripts/ifcfg-eth0/

you will see various constants in there.

the one you are concerned with its:

For example:
instead of IPADDR=dhcp you want IPADDR=192.168.1.1

Pretty easy...write a script to turn on or off

This should work on most distros.

posted @ 2013-10-10 20:07  alxe_yu  阅读(125)  评论(0)    收藏  举报