您的位置:首页 > 其它

Ubuntu系统 使用与开发 常见异常与解决办法

2020-03-12 18:43 288 查看

文章目录

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.
#
XDG_DESKTOP_DIR="$HOME/Desktop"
XDG_DOWNLOAD_DIR="$HOME/Downloads"
XDG_TEMPLATES_DIR="$HOME/Template"
XDG_PUBLICSHARE_DIR="$HOME/Public"
XDG_DOCUMENTS_DIR="$HOME/Documents"
XDG_MUSIC_DIR="$HOME/Music"
XDG_PICTURES_DIR="$HOME/Pictures"
XDG_VIDEOS_DIR="$HOME/Videos"

如果在家目录下不存在这些文件夹,可以在终端中执行

mkdir xxx
创建相应文件夹,再重启即可匹配到相应系统文件夹。

  • 点赞 1
  • 收藏
  • 分享
  • 文章举报
cutercorley 发布了86 篇原创文章 · 获赞 571 · 访问量 16万+ 私信 关注
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: 
相关文章推荐