当前位置: 移动技术网 > 科技>操作系统>Linux > Ubuntu安装后配置

Ubuntu安装后配置

2019年04月15日  | 移动技术网科技  | 我要评论
  1. 配置源
    将所有源配置为华科()或者中科大源()
    使用vi编辑,使用命令

    :%s/ubuntu源地址.com/mirrors.hust.edu.cn
    
  2. 更新

    sudo apt update && sudo upgrade -y
    
  3. 安装必要软件

    sudo apt install -y clang clang-format llvm make build-essential python3-dev python3-pip gnome-tweaks chrome-gnome-shell gedit-plugin-draw-spaces gedit-plugins vim vim-gtk vim-nox stardict calibre filezilla
    pip3 install pyqt5 gitpython
    sudo snap install --classic code
    
  4. 配置主题,美化

  5. 将中文文件夹改为英文

    gedit ~/.config/user-dirs.dirs
    
  6. ssd优化

    • 在fstab中加入 noatime,discard
    • 使用内存
      tmpfs /tmp tmpfs defaults,noatime,nodiratime,mode=1777 0 0
      tmpfs /var/log tmpfs defaults,noatime,mode=1777 0 0
      tmpfs /var/tmp tmpfs defaults,noatime,mode=1777 0 0
      
    • 在开机启动 rc.local加入
      echo noop > /sys/block/sdb/queue/scheduler
      
    • 浏览器
      主要是浏览器 firefox
      打开firefox,输入about:config
      单击右键新建string类型
      添加 browser.cache.disk.parent_directory 将值设为 /tmp
      重启firefox
      chrome
      cd ~/.cache/google-chrome/default/ && rm -rf cache && ln -sf /tmp cache
      
  7. 开机启动

    • 添加配置文件
      ln -fs /lib/systemd/system/rc-local.service /etc/systemd/system/rc-local.service
      
    • 编辑配置文件
      gedit /etc/systemd/system/rc-local.service
      添加:
          [install]  
          wantedby=multi-user.target  
          alias=rc-local.service
      
    • 创建rc.local
      sudo touch /etc/rc.local
      sudo chmod 755 /etc/rc.local
      
    • 添加内容
      #!/bin/bash  
      echo "test rc " > /var/test.log  

如对本文有疑问, 点击进行留言回复!!

相关文章:

验证码:
移动技术网