Ubuntu踩坑记录

417 阅读4分钟
  1. 制作多系统启动盘(Ubuntu、windows10等)
  2. 安装系统
  3. 如果vim不能backspace删除,要安装
    sudo apt-get install vim
    
  4. 设置自动挂载磁盘
    sudo vi /etc/fstab
    
    # /etc/fstab: static file system information.
    #
    # Use 'blkid' to print the universally unique identifier for a
    # device; this may be used with UUID= as a more robust way to name devices
    # that works even if disks are added and removed. See fstab(5).
    #
    # <file system> <mount point>   <type>  <options>       <dump>  <pass>
    # / was on /dev/nvme0n1p2 during installation
    UUID=cabeb0c8-9ca4-4345-9d9a-e02e11b0c877 /               ext4    errors=remount-ro 0       1
    # /boot/efi was on /dev/nvme0n1p1 during installation
    UUID=40E1-29E0  /boot/efi       vfat    umask=0077      0       1
    /swapfile                                 none            swap    sw              0       0
    /dev/sda1 /fzhxkj ext4 defaults,x-gvfs-show 1 2
    /dev/sda2 /data ext4 defaults,x-gvfs-show 1 2
    /dev/sda3 /win10 ext4 defaults,x-gvfs-show 1 2
    
  5. 设置国内软件源(阿里等)
  6. 关于输入法 (在Ubuntu20.04中,fcitx相关输入法不定时失效)
    • Ubuntu 20.04中对于fcitx的支持不足(似乎是由于取消qt4支持)
    • 搜狗输入法(Ubuntu20.04安装不上;Ubuntu18安装成功后,再升级系统至Ubuntu20.04,输入法正常)
    • 百度输入法
  7. 安装常用工具(.deb)
  • utools :账号一键同步常用配置(hosts,一键打开vscode项目)
  • 有独显,修改显卡驱动(用系统默认的就好了,不然各种坑没法填)
  • 谷歌浏览器
  • 截屏 Sreenshot tool
  • 录屏 obs
  • wps
  • 网易云音乐
  • 百度网盘
  • 坚果云
  • 远程协助(teamviewwer、向日葵)
  • vscode 国内cdn加速下载地址
    https://vscode.cdn.azure.cn/stable/507ce72a4466fbb27b715c3722558bb15afa9f48/code_1.57.1-1623937013_amd64.deb
    
  1. 安装开发工具(npm、vscode、 yarn、git 等)
  2. 配置oh my zsh;若资源慢替换gitee.com
    • 安装插件命令范式
      git clone https://github.com/zsh-users/zsh-syntax-highlighting.git ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-syntax-highlighting
      
  3. 美化桌面 (外网偏慢)
  • extenssion.gnome.org插件,可以安装火狐浏览器扩展,方便直接开关安装扩展
  • tweeks (可视化美化管理工具)
    sudo apt-get install gnome-tweak-tool
    
  • TopIcons Plus
  • gnome-look.org 主题等(可以先安装ocs-url工具方便直接安装)
  1. 配置开发工具等(sudo 不要滥用)
  • (npm、yarn等淘宝源)
  • git shh 生成、配置
    ssh-keygen -o
    
  • 登录私有npm仓库
    npm adduser --registry http:// localhost:4873 /
    
  • 修改npm、yarn 全局、缓存 目录
    yarn config set cache /data/npm_cache 
    config config set cache /data/npm_cache 
    
  • vpn
    • 安装L2TP的VPN配置
       sudo  add-apt-repository ppa:nm-l2tp/network-manager-l2tp
       sudo apt-get install software-properties-common
       sudo apt-get install network-manager-l2tp network-manager-l2tp-gnome
      
    • 安装openVpn 客户端
      sudo apt install network-manager-openvpn network-manager-openvpn-gnome
      
  • 硬盘在文件中查看不到;Ubuntu【硬盘】应用中对应设置
  1. 安装Windows版本相关软件
  2. 设置开机启动程序
  • (Ubuntu18.04)用了网上3种方法都没有设置成功,几天之后【启动应用程序】重新设置又可以了;
  • 升级Ubuntu20.06后正常
  1. web版本套壳

    1. 设置electron国内源
      npm config set electron_mirror https://npm.taobao.org/mirrors/electron/
      
    2. windows 有道云笔记、linux 为知笔记
    3. 钉钉
      • npm i -g nativefier      
        nativefier --icon /usr/share/icons/dingtalk.png --name dingtalk -p linux -a x64 --width "998px" --height "602px" https://im.dingtalk.com /opt/
        
      • --width、--height 参数无效;可以手动调整一次窗口后,下次打开登录会保存上次调整后的尺寸
      • 宿舍网络,钉钉不能登录
    4. 微信
      • 微信(网页版受账号保护,不能登录)
    5. 生成桌面快捷方式
  2. 浏览器扩展

    • 火狐浏览器,直接从面向开发者的扩展快捷安装
    • React Developer Tools
    • Redux DevTools
    • Vue.js devtools
    • Gnome Shell integration(Ubuntu 系统通过浏览器快速安装gnome桌面扩展)
    • Gesturefy(鼠标手势,方便快捷操作)
  3. 将系统升级到最新版本(如果需要)

    sudo apt-get dist-upgrade
    
  4. 克隆系统应用;初步尝试,系统无法正常启动;折腾了几次,没解决;直接先重装系统里。

  5. U盘启动无法看到U盘启动选项

    • BIOS->load default setting?
  6. 安装双系统,不能创建磁盘

  7. Ubutu修改时区

  8. 文件扫描数报错(System limit for number of file watchers reached)

    echo fs.inotify.max_user_watches = 524288 | sudo tee -a /etc/sysctl.conf
    
    sudo sysctl -p