Ubuntu 相關指令集

Update the package lists

1
sudo apt update

Upgrade the package version

1
sudo apt upgrade

Install C++ with Google Test

1
2
3
4
5
6
sudo apt update
sudo apt install g++ make libgtest-dev cmake
cd /usr/src/gtest
sudo cmake CMakeLists.txt
sudo make
sudo cp *.a /usr/lib

Install Java

1
sudo apt install default-jdk default-jre maven

Install Python

Linux would have installed Python 2.x and Python 3.x.

If you don’t find it, install it by using following commands:

1
2
sudo apt install python3   //安裝python 3.x
sudo apt install python //安裝python 2.x