Server Fault is a question and answer site for system and network administrators. 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

I made a big mistake. Instead of typing :

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

I typed:

rm -rf /etc/syconfig/network-scripts

Can anybody help me to repair this mistake?

Thanks in advance!

share|improve this question
Oh, don't use -r if you're deleting individual files. – cjc Feb 8 '12 at 15:29
Restore then from your backup? – Zoredache Feb 8 '12 at 17:54
up vote 5 down vote accepted
$ rpm -qf /etc/sysconfig/network-scripts/

So, get the initscripts RPM and re-install it.


You can get it from

Of course, you can get your network interface up and running without actually using the "ifup" script, or whatever. They're basically wrappers for "ip" or "dhclient" in any case. For example, if your eth0 interface is supposed to get its configuration dynamically, you should be able to run "dhclient eth0" directly. If it's static, you should be able to run "ip link set dev eth0 up ; sleep 10 ; ip addr add brd dev eth0" or something like that. Consult "man ip" for the actual options. (I'm old fashioned, and am more used to running ifconfig eth0 up or something similar).

share|improve this answer
yes, but I cannot connect to internet from the machine! – artaxerxe Feb 8 '12 at 14:11
Well, you're posting to the Internet right now, so can you do a sneakernet? You can get the RPM from…. If you want to get an interface up, you can use "ifconfig eth0" or "dhclient" commands, or something like that. The network-scripts scripts are mainly wrappers for those, anyway. – cjc Feb 8 '12 at 14:17
thanks cjc! It works very good! – artaxerxe Feb 9 '12 at 6:38

Here's a list of what would have been in that directory and what some of those files would have looked like.

Type them in by hand until you can get the box back on the network.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.