一、安装
1)源安装
使用如下命令来增加源:
curl https://packages.microsoft.com/keys/microsoft.asc | gpg --dearmor > microsoft.gpg
mv microsoft.gpg /etc/apt/trusted.gpg.d/microsoft.gpg
sh -c 'echo "deb [arch=amd64] https://packages.microsoft.com/repos/vscode stable main" > /etc/apt/sources.list.d/vscode.list'
然后更新包缓存,安装code
apt update
apt install code
执行完上述命令后即可在快捷方式搜索栏搜索到 VScode
2)apt管理器安装、更新
apt install apt-transport-https
apt update
apt install code
二、无法启动时解决方法
搜索vscode,右键编辑应用程序,修改引导命令
/usr/share/code/code --no-sandbox --unity-launch %F
三、原因
Running as root without --no-sandbox is not supported. See https://crbug.com/638180.
|