文章目录
1.误删除Ubuntu家目录下系统自带文件夹如Desktop、Downloads等
在开发过程中,不小心在终端中把当前用户的Desktop、Downloads、Music等文件夹删除。
解决措施:
通过修改 ~/.config/user-dirs.dirs 中的XDG_DESKTOP_DIR来重新指定系统文件夹:
# This file is written by xdg-user-dirs-update
# If you want to change or add directories, just edit the line you're
# interested in. All local changes will be retained on the next run
# Format is XDG_xxx_DIR="$HOME/yyy", where yyy is a shell-escaped
# homedir-relative path, or XDG_xxx_DIR="/yyy", where /yyy is an
# absolute path. No other format is supported.

本文介绍在Ubuntu中不慎删除系统预设文件夹(如Desktop、Downloads等)后的恢复方法。通过修改~/.config/user-dirs.dirs文件,重新指定系统文件夹路径,或直接在终端创建缺失文件夹并重启系统,实现快速恢复。
最低0.47元/天 解锁文章
3643

被折叠的 条评论
为什么被折叠?



