Wei Zhang's Blog

20 Nov 2021

Setup working environment on a new machine

Recently I replaced my old laptop with a new one. This post records the steps to install some neccessary packages on the new machine after the operating system (Ubuntu 20.04.3) is installed.

Update apt source

The first step is to add a new source for package installation. This is done in the following two steps.

  1. Add the following lines to the file: /etc/apt/source.list (this source is suitable for mainland China. One should use a different source depending on locations).
	deb http://mirrors.aliyun.com/ubuntu/ focal main restricted
	deb http://mirrors.aliyun.com/ubuntu/ focal-updates main restricted
	deb http://mirrors.aliyun.com/ubuntu/ focal universe
	deb http://mirrors.aliyun.com/ubuntu/ focal-updates universe
	deb http://mirrors.aliyun.com/ubuntu/ focal multiverse
	deb http://mirrors.aliyun.com/ubuntu/ focal-updates multiverse
	deb http://mirrors.aliyun.com/ubuntu/ focal-backports main restricted universe multiverse
	deb http://mirrors.aliyun.com/ubuntu/ focal-security main restricted
	deb http://mirrors.aliyun.com/ubuntu/ focal-security universe
	deb http://mirrors.aliyun.com/ubuntu/ focal-security multiverse
	deb http://mirrors.aliyun.com/ubuntu/ focal main restricted
  1. Run the command to update the source
	sudo apt update

Configuration files

I have copied the following configuration files from my old laptop.

  1. ~/.bashrc
  2. ~/.gitconfig and ~/.git-credentials
  3. ~/.vimrc
  4. the files config and known_hosts under the directory ~/.ssh

Some general softwares

  1. Install Git, Subversion, Make, Vim, g++:
	sudo apt install git subversion make
	sudo apt install vim
	sudo apt install g++ 
  1. Install Latex, Okular, pdftk:
	sudo apt install texlive-full
	sudo apt install okular
	sudo apt install pdftk
  1. Google Chrome:

    First download the deb package from the official website. Then run

	sudo dpkg -i google-chrome-stable_current_amd64.deb

Also install the vimium plugin.

  1. Hugo and Firebase: tools for building websites.

    See the previous post.

  2. Chinese Input:

	sudo apt install ibus ibus-clutter ibus-gtk ibus-gtk3
	sudo apt install ibus-pinyin

Packages for scientific computing

  1. Miniconda: for package management.

  2. Python packages: numpy, scipy, matplotlib, jupyter nootbook, and pytorch.

	conda install numpy
	conda install scipy
	conda install matplotlib
	conda install jupyter notebook
	conda install pytorch torchvision torchaudio -c pytorch
  1. MPICH: library for parallel computing.
	sudo apt install mpich
  1. OpenMM: library for molecular simulation, and the OpenMM PyTorch Plugin that allows the use of forces defined by PyTorch.
	conda install -c conda-forge openmm
	conda install -c conda-forge openmm-torch
  1. Libconfig: library for processing configuration files, installed from source.
  2. CMake: tools for library building, installed from source.
  3. FFTW: package for Fast Fourier Transform, installed from source.
  4. Ranlib.c.tar.gz: codes for random number generator, installed from source.