Install Visual Studio Code in Ubuntu 16.04 LTS

add key

curl https://packages.microsoft.com/keys/microsoft.asc | gpg --dearmor > microsoft.gpg
sudo mv microsoft.gpg /etc/apt/trusted.gpg.d/microsoft.gpg

或者用如下命令添加key,两者效果相同。

wget -q https://packages.microsoft.com/keys/microsoft.asc -O- | sudo apt-key add -

add source

sudo sh -c 'echo "deb [arch=amd64] https://packages.microsoft.com/repos/vscode stable main" > /etc/apt/sources.list.d/vscode.list'

update

apt update

install

apt install -y code

你可能感兴趣的:(Install Visual Studio Code in Ubuntu 16.04 LTS)