Files
linux-wiki/content/deepin折腾笔记/第五章/5.17.md
2021-10-21 14:57:58 +08:00

10 lines
897 B
Markdown
Executable File
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
# 5.17 重置所有用户配置
该方法仅当出现疑难杂症无法解决时,才考虑采取的不得已的手段,可以将所有用户配置重置,但也会丢失主目录下所有的资料。请在使用该方法前,一定要备份好主目录。这时就体现了存在一个自动挂载的数据盘的重要性了。
方法是在终端执行命令:`sudo init 3`
系统重启后会进入shell登陆。比如用户名是user则主目录是/home/user。
那么先手动删除主目录:`sudo rm -rf /home/user`
再重建主目录并获取所有权:`sudo mkdir /home/usersudo chown user:user /home/user`
重启reboot就行了。
注意请务必替换上面命令的user为你当前系统正在使用的用户名。
注意:请一定要先备份好主目录的资料,否则找不回!