When it comes to app development, you've probably heard of Visual Studio Code. Often referred to by its shorthand VS Code, this is a popular code editor used on Windows and even macOS. However, if you're using one of the many great laptops running Ubuntu Linux or an Ubuntu desktop, you should be happy to know that you can run VS Code on your system. You can install it as a Snap package, as an Apt, or even via the Ubuntu Software Center or through a manual download. We'll look at all three methods for you here.
How to install VS Code on Ubuntu via Software Center
The easiest way to install VS Code on Ubuntu is through the Software Center. It's similar to the Microsoft Store on Windows or the app stores for iOS and Android. You don't have to dig around in the terminal or take any extra steps. Just click a few buttons and you're ready to use the app.
- Start Ubuntu search using the Start button on your keyboard.
- Search for Ubuntu software.
- Click on the top result and start the app.
- In the search bar at the top left, search for VScode.
- Click on the top result for code.
- Click on the Install Button.
- Enter your password when prompted.
- To install, follow the steps on your screen.
If you have trouble finding VS Code through the Software Center, you can also download it manually. Just visit the Visual Studio Code website and click Download .DEB. Once the file is downloaded, double-click it to launch it and press the green Install Button.
Related
How to install VMWare Tools on Ubuntu
After installing Ubuntu in any VMWare product such as Fusion, Workstation or Player, you need VMWare Tools to manage the operating system.
How to install VS Code as a Snap package
If you prefer to install VS Code as a Snap package for easier management and easier self-management, all you need to do is run the following commands. Remember that you need to press Input after each command.
- Start a terminal session.
- Install VS Code:
sudo snap install --classic code
- Enter your password.
- Allow the app to download
- Once the download is complete, you can search for VS Code using the following command:
code --version
How to install VS Code with apt
Finally, there is the most difficult method of all to install VS Code. This is intended for more technical users who are comfortable with the terminal and advanced boilerplate. Here's how to do it.
- Start a terminal session.
- Update your repository:
sudo apt update
- Enter your password.
- Install wget and gpg:
sudo apt-get install wget gpg
- Install the dependencies for VS Code:
wget -qO- https://packages.microsoft.com/keys/microsoft.asc | gpg --dearmor > packages.microsoft.gpg
- Enter your password.
- Install the package:
sudo install -D -o root -g root -m 644 packages.microsoft.gpg /etc/apt/keyrings/packages.microsoft.gpg
- Enter your password.
- Run the command:
sudo sh -c 'echo "deb [arch=amd64,arm64,armhf signed-by=/etc/apt/keyrings/packages.microsoft.gpg] https://packages.microsoft.com/repos/code stable main" > /etc/apt/sources.list.d/vscode.list'
- Enter your password.
- Run the command:
rm -f packages.microsoft.gpg
- Run the command:
sudo apt install apt-transport-https -y
- Run the command:
sudo apt install code
Once you have completed the above steps, you can verify the installation with Code – Version.
That's it! You should now have VS Code installed on Ubuntu. We also recommend installing other developer tools like MySQL or Java. If you decide to remove the app, the steps are different for each installation method. If you installed the app via the Software Center, visit the Furnished the app and click Uninstall. If you installed with Snap, use the command sudo snap Remove code. If you installed with apt, use the command sudo apt Remove code.