帮助中心 >  技术知识库 >  云服务器 >  服务器教程 >  centos6登录错误could not chdir to home directory /root:No such file directory

centos6登录错误could not chdir to home directory /root:No such file directory

2017-11-08 11:49:58 19156

今天测试时不知怎么把根目录的root文件夹删除重启后提示错误

could not chdir to home directory /root:No such file directory

意思是找不到家 没有root目录文件

重启后变成

R2.png


解决办法:

1.直接创建/root目录;mkdir /root

2.复制/etc/skel/下的隐藏文件到/root目录下;cp /etc/skel/.bash* /root

3.reboot重启


R3.png


重启后正常

提交成功!非常感谢您的反馈,我们会继续努力做到更好!

这条文档是否有帮助解决问题?

非常抱歉未能帮助到您。为了给您提供更好的服务,我们很需要您进一步的反馈信息:

在文档使用中是否遇到以下问题: