Get the App
SLTechnology News&Howtos  ›  Servers  › 

What if centos accidentally deletes the / root directory

Shulou Source: shulou.com Published: 2022-06-01 18:21:25 10月04日 Update

This article mainly introduces centos accidentally delete / root directory how to do, the article is very detailed, has a certain reference value, interested friends must read it!

Accidentally delete the / root of centos with rm-rf during the test.

Delete the / root directory, the system will not crash, it can start normally, but it just looks uncomfortable!

Solution:

1. Create / root directory directly; mkdir / root

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

3. Just restart it.

4. Be careful when using rm-rf in the production environment, and it is best to test in the test environment to make sure there is no problem before using it!

The above is all the contents of the article "what to do when centos accidentally deletes / root directory". Thank you for reading! Hope to share the content to help you, more related knowledge, welcome to follow the industry information channel!

Tags: Catalogs tests what to do content time environment articles values interests methods guys partners that is documents more best knowledge systems industry information Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno vpn Docker NVidia Shulou Tech Info macOS