[Software configuration after ubuntu reinstallation system_memo]

The system environment is restored after reinstalling the system

    • backup
    • install the system
    • Some commonly used deb
      • vscode
    • change sources
    • pip speed up
    • The guy who climbed the Great Wall
    • Install ROS
    • install cmake
    • install git
    • install zsh
    • Open a ssh by the way
    • Mapping to Enhance Well-Being
    • configure neovim
      • plugins
      • font
      • plug-in
      • problems encountered
    • Lock keyboard/mouse
      • Gizmos

Backup

  1. Unremarkable picture during the experiment
  2. handwritten script
  3. Forgot where to download resources

Install the system

slightly

Some commonly used deb

vscode

Easy to see some files

Change sources

  • sudo vim /etc/apt/sources.list

  • ATTENTION THIS IS FOR Ubuntu20.04(ustc)

    20.04: focal; 18.04: bionic; 16.04: xenial; 14.04: trusty

    # The source code warehouse is commented by default, if necessary, you can uncomment it yourself
    deb https://mirrors.ustc.edu.cn/ubuntu/ focal main restricted universe multiverse
    # deb-src https://mirrors.ustc.edu.cn/ubuntu/ focal main restricted universe multiverse
    deb https://mirrors.ustc.edu.cn/ubuntu/ focal-security main restricted universe multiverse
    # deb-src https://mirrors.ustc.edu.cn/ubuntu/ focal-security main restricted universe multiverse
    deb https://mirrors.ustc.edu.cn/ubuntu/ focal-updates main restricted universe multiverse
    # deb-src https://mirrors.ustc.edu.cn/ubuntu/ focal-updates main restricted universe multiverse
    deb https://mirrors.ustc.edu.cn/ubuntu/ focal-backports main restricted universe multiverse
    # deb-src https://mirrors.ustc.edu.cn/ubuntu/ focal-backports main restricted universe multiverse
    # Pre-release software source, not recommended to enable
    # deb https://mirrors.ustc.edu.cn/ubuntu/ focal-proposed main restricted universe multiverse
    # deb-src https://mirrors.ustc.edu.cn/ubuntu/ focal-proposed main restricted universe multiverse
    
    • After changing the source, it may cause
      The following signatures couldn't be verified because the public key is not available: NO_PUBKEY [string of characters]
      • sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys [string of characters]
  • The company’s self-built source

pip acceleration

  • pip configuration

  • cd & amp; & amp; mkdir .pip & amp; & amp; cd .pip & amp; & amp; touch pip.conf

     [global]
      index-url = http://pypi.doubanio.com/simple
      trusted-host = pypi.doubanio.com
      disable-pip-version-check=true
      timeout = 60
      [freeze]
      timeout = 10
    

The guy who climbed the Great Wall

slightly

Install ROS

Install cmake

Install git

Install zsh

Super cool zsh configuration

  • sudo apt install zsh
  • sh -c "$(curl -fsSL https://raw.github.com/ohmyzsh/ohmyzsh/master/tools/install.sh)"
  • install sh

By the way, open ssh

  • sudo apt-get install openssh-server

Map to enhance happiness

  • MY ALIAS
    • alias mk="cmake .. & amp; & amp; make -j16 & amp; & amp; make package"
    • alias nv="nvim"

Configure neovim

  • ubuntu18.04 is installed in this way, the default version is 0.6.1
    • sudo apt-add-repository ppa:neovim-ppa/stable
    • sudo apt-get update
    • sudo apt-get install neovim
  • You can compile 0.8.2 from source code

plugins

  • Refer to init.vim, put it under ~/.config/nvim/

Font

  • When entering nv / nvim, MRU (The Most Recently Used) displays garbled characters
    • Download Droid Sans Mono Nerd Font Complete Mono font
      • Double-click and click Install
    • Select -preference -> profile -> Text -> Custom font in the terminal to select the font to download and install

Plugins

  • coc needs to install nodejs, >= 12.12, copilot needs >= 16.x
    • If already installed, need to remove
      • sudo apt-get purge --auto-remove nodejs
    • If the curl command is not installed
      • sudo apt-get install curl
    • install nodejs
      • curl -sL https://deb.nodesource.com/setup_16.x | sudo -E bash -
      • sudo apt-get install -y nodejs
    • update coc version
    • yarn install
    • auto-save requires coc
  • CocInstall coc-marketplace
    • You can manage plugins directly in vim
    • CocList marketplace python is to search for python-related plug-ins
  • Auto-completion in coc will conflict with tab (indentation)
  • [coc.nvim] Jedi error: import jedi
    • pip3 install jedi
    • pip3 show jedi
    • Add “python.jediPath” in coc-settings.json: path

    Problems encountered

  • E117: Unknown function: SemshiBufWipeout
    • UpdateRemotePlugins
  • E319: No “python3” provider found. Run “:checkhealth provider”
    • pip install neovim
  • E605: Exception not caught: Error on request: Vim(return):Error invoking format’ on channel 3 (coc):^@Format provider not found for buffer: 2
    • .clang-format

Lock keyboard/mouse

  • sudo apt-get install xtrlock

  • sudo touch /usr/local/bin/lockkbmouse

  • sudo vim /usr/local/bin/lockkbmouse

    #!/usr/bin/env/bash
    sleep 1 & & xtrlock
    
  • shortcutPlease add a picture description

    • ubuntu20.04
      • bash -c "sleep 1 & amp; & amp; xtrlock"
        Lock mouse and keyboard shortcuts

Gizmo

  • bastet (Tetris)