Before Everything

Please get the following items ready before you start.

WSL

  1. enable the developer mode

    ../_images/WSL_step1.png
  2. install Ubuntu

    ../_images/WSL_step2.png
  3. enable the WSL function

    ../_images/WSL_step3.png
  4. open Ubuntu (For the first time, it will install itself and ask you to create a default UNIX user account)

    ../_images/WSL_step4.png
  5. change apt source

    • open file /etc/apt/sources.list with root privilege

    • replace the original contents with

      deb http://mirrors.aliyun.com/ubuntu/ bionic main restricted universe multiverse
      deb http://mirrors.aliyun.com/ubuntu/ bionic-security main restricted universe multiverse
      deb http://mirrors.aliyun.com/ubuntu/ bionic-updates main restricted universe multiverse
      deb http://mirrors.aliyun.com/ubuntu/ bionic-proposed main restricted universe multiverse
      deb http://mirrors.aliyun.com/ubuntu/ bionic-backports main restricted universe multiverse
      deb-src http://mirrors.aliyun.com/ubuntu/ bionic main restricted universe multiverse
      deb-src http://mirrors.aliyun.com/ubuntu/ bionic-security main restricted universe multiverse
      deb-src http://mirrors.aliyun.com/ubuntu/ bionic-updates main restricted universe multiverse
      deb-src http://mirrors.aliyun.com/ubuntu/ bionic-proposed main restricted universe multiverse
      deb-src http://mirrors.aliyun.com/ubuntu/ bionic-backports main restricted universe multiverse
      
      please replace the codename (bionic) with that of your system,
      which could be queried with
      lsb_release -c
      
  6. change pip source

    • create file ~/.pip/pip.conf

    • fill it with

      [global]
      index-url = https://mirrors.aliyun.com/pypi/simple
      
      [install]
      trusted-host=mirrors.aliyun.com
      
  7. install basic tools

    sudo apt-get update
    sudo apt-get -f install
    sudo apt-get upgrade
    sudo apt-get install cmake ffmpeg g++ gcc gitk make python3 python3-pip tree --fix-missing
    sudo pip3 install numpy sphinx
    
  8. change some settings

    • open file ~/.bashrc with root privilege

    • replace

      PS1='${debian_chroot:+($debian_chroot)}\[\033[01;32m\]\u@\h\[\033[00m\]:\[\033[01;34m\]\w\[\033[00m\]\$ '
      

      with

      PS1='${debian_chroot:+($debian_chroot)}\[\033[01;32m\]\u\[\033[00m\]@\[\033[01;34m\]\W\[\033[00m\]\$ '
      

Git

Xming

  1. install Xming

    ../_images/Xming_step1.png

    (http://www.straightrunning.com/XmingNotes/)

  2. set global variable DISPLAY

    • open ~/.bashrc with root privilege

    • add

      export DISPLAY=:0.0
      

VS Code

  1. install VS Code

    ../_images/VSCode_step1.png

    (https://code.visualstudio.com/Download)

  2. install some extensions

    • Better Comments

    • Binary

    • C/C++

    • Chinese (Simplified) Language Pack for Visual Studio code

    • Excel Viewer

    • Git History

    • Jupyter

    • Matlab

    • Octave

    • Python

    • Remote - WSL

    • Tcl

    • Verilog-HDL/SystemVerilog/Bluespec SystemVerilog

    • vscode-pdf

    ../_images/VSCode_step2.png
  3. change some settings

    • enable Indent Using Spaces (press key ctrl+shift+p and search it)

    • disable C_Cpp: Code Folding of C/C++ extension (open C/C++‘s settings and search it)

  4. open folders and reopen them in WSL

    ../_images/VSCode_step4.png
  5. Now you can start to work!