Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

In my CentOS, i need to run dhclient -v command at every time i start/reboot the server. How to make this permanent please?

share|improve this question

migrated from stackoverflow.com Apr 5 '13 at 4:41

This question came from our site for professional and enthusiast programmers.

up vote 4 down vote accepted

In CentOS, put the following into /etc/sysconfig/network-scripts/ifcfg-ethX:

DEVICE=ethX
BOOTPROTO=dhcp
ONBOOT=yes
HWADDR=XX:XX:XX:XX:XX:XX

Of course change ethX to your interface name (eth0, eth1 or similar).

Similarly, change HWADDR to yours interface MAC address. You can see it by looking at the output of ifconfig -a command (the part after HWaddr keyword).

share|improve this answer
    
Oh yes it worked! Thank! – 夏期劇場 Apr 4 '13 at 9:12

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .