linux 安装vscode
时间: 2023-04-19 14:00:10 浏览: 255
在 Linux 上安装 Visual Studio Code 的方法有多种,其中一种是通过下载安装包并运行安装脚本。
首先,访问 Visual Studio Code 的官网(https://code.visualstudio.com/),在页面中选择 Linux 版本并下载安装包。
下载完成后,在终端中使用以下命令解压安装包:
```
tar -xvf <安装包文件名>
```
解压后,进入解压出的目录并运行安装脚本:
```
cd <解压出的目录>
./install.sh
```
安装过程中会提示输入密码,输入后等待安装完成即可。
安装完成后,在终端中输入 `code` 即可启动 Visual Studio Code。
相关问题
linux安装vscode
要在Linux上安装VS Code,请按照以下步骤操作:
1. 打开终端并输入以下命令,以添加Microsoft GPG密钥:
```
wget -qO- https://packages.microsoft.com/keys/microsoft.asc | gpg --dearmor > microsoft.asc.gpg
sudo install -o root -g root -m 644 microsoft.asc.gpg /etc/apt/trusted.gpg.d/
```
2. 接下来,添加Visual Studio Code存储库:
```
sudo sh -c 'echo "deb [arch=amd64] https://packages.microsoft.com/repos/vscode stable main" > /etc/apt/sources.list.d/vscode.list'
```
3. 更新包列表:
```
sudo apt-get update
```
4. 最后,安装VS Code:
```
sudo apt-get install code
```
安装完成后,您可以在应用程序菜单中找到VS Code。
linux 安装 vscode
在Linux系统上安装Visual Studio Code (VSCode) 可以按照以下步骤操作:
1. **更新包列表**:
首先,你需要更新你的包列表。打开终端(Terminal),输入:
```
sudo apt update
```
2. **安装依赖**:
如果你的系统是基于Debian或Ubuntu的,可以使用以下命令安装`gnupg`,这有助于从官方源下载VSCode:
```
sudo apt install gnupg
```
3. **添加Microsoft的官方存档密钥**:
运行以下命令来添加VSCode的官方GPG密钥,这将让你能够信任并安装来自官方的软件包:
```bash
curl -fsSL https://packages.microsoft.com/keys/microsoft.asc | gpg --dearmor > microsoft.gpg
sudo mv microsoft.gpg /etc/apt/trusted.gpg.d/
```
4. **配置软件源**:
将下面这个存档添加到你的`sources.list.d`目录:
```
echo "deb [arch=amd64 signed-by=/etc/apt/trusted.gpg.d/microsoft.gpg] https://packages.microsoft.com/repos/vscode stable main" >> /etc/apt/sources.list.d/vscode.list
```
5. **更新并安装VSCode**:
现在你可以更新并安装VSCode了:
```
sudo apt update
sudo apt install code
```
如果你遇到权限问题,可以用`sudo -H`替换`sudo`。
6. **启动VSCode**:
安装完成后,通过终端键入 `code` 或者在应用程序搜索栏找到并运行它。
阅读全文
相关推荐














