How to run visual studio code in linux?

Member

by johann , in category: General Help , a year ago

How to run visual studio code in linux?

Facebook Twitter LinkedIn Telegram Whatsapp

2 answers

Member

by adolf , a year ago

@johann 

To run Visual Studio Code on Linux, follow the steps below:

  1. Open your Linux distribution's terminal.
  2. Install dependencies: For Ubuntu/Debian-based distributions: sudo apt update sudo apt install software-properties-common apt-transport-https wget For Fedora/RHEL-based distributions: sudo dnf install wget
  3. Import the Microsoft GPG key: wget -q https://packages.microsoft.com/keys/microsoft.asc -O- | sudo gpg --dearmor -o /etc/apt/trusted.gpg.d/microsoft.gpg
  4. Add the Visual Studio Code repository: For Ubuntu/Debian-based distributions: sudo add-apt-repository "deb [arch=amd64] https://packages.microsoft.com/repos/vscode stable main" For Fedora/RHEL-based distributions: sudo rpm --import https://packages.microsoft.com/keys/microsoft.asc sudo sh -c 'echo -e " [code] name=Visual Studio Code baseurl=https://packages.microsoft.com/yumrepos/vscode enabled=1 gpgcheck=1 gpgkey=https://packages.microsoft.com/keys/microsoft.asc" > /etc/yum.repos.d/vscode.repo'
  5. Install Visual Studio Code: For Ubuntu/Debian-based distributions: sudo apt update sudo apt install code For Fedora/RHEL-based distributions: sudo dnf check-update sudo dnf install code
  6. Launch Visual Studio Code: For Ubuntu/Debian-based distributions: code For Fedora/RHEL-based distributions: code


After completing these steps, Visual Studio Code should launch successfully on your Linux system.

Member

by gaston , 7 months ago

@johann 

  1. Open your Linux distribution's terminal.
  2. Install dependencies: For Ubuntu/Debian-based distributions:
1
2
sudo apt update
sudo apt install software-properties-common apt-transport-https wget


For Fedora/RHEL-based distributions:

1
sudo dnf install wget


  1. Import the Microsoft GPG key:
1
wget -q https://packages.microsoft.com/keys/microsoft.asc -O- | sudo gpg --dearmor -o /etc/apt/trusted.gpg.d/microsoft.gpg


  1. Add the Visual Studio Code repository: For Ubuntu/Debian-based distributions:
1
sudo add-apt-repository "deb [arch=amd64] https://packages.microsoft.com/repos/vscode stable main"


For Fedora/RHEL-based distributions:

1
2
3
4
5
6
7
sudo rpm --import https://packages.microsoft.com/keys/microsoft.asc
sudo sh -c 'echo -e "[code]
name=Visual Studio Code
baseurl=https://packages.microsoft.com/yumrepos/vscode
enabled=1
gpgcheck=1
gpgkey=https://packages.microsoft.com/keys/microsoft.asc" > /etc/yum.repos.d/vscode.repo'


  1. Install Visual Studio Code: For Ubuntu/Debian-based distributions:
1
2
sudo apt update
sudo apt install code


For Fedora/RHEL-based distributions:

1
2
sudo dnf check-update
sudo dnf install code


  1. Launch Visual Studio Code: For Ubuntu/Debian-based distributions:
1
code


For Fedora/RHEL-based distributions:

1
code


After completing these steps, Visual Studio Code should launch successfully on your Linux system.