centos accidentally deleted / how to solve the root directory

When the test is not careful centos / root with rm -rf to delete

  Delete / root directory, the system does not crash, you can also start, but is looked at in a bad mood!

  Solution:

  1. Create a direct / root directory; mkdir / root

  2. Copy hidden files / etc / skel / next to / under the root directory; cp /etc/skel/.bash* / root

  3. I can restart

  4. production environment when using rm -rf must be careful, it is best to test in a test environment and then make sure that no problems !!!

Guess you like

Origin www.cnblogs.com/wangdidi/p/10956458.html