Raspberry Pi

How to Install Visual Studio Code on Raspberry Pi OS

Visual Studio Code is an open-source programming editor that allows users to write codes in multiple programming languages such as C, C++, C#, Java, Python, JavaScript and more. This editor is the best choice for those interested in learning web development or creating projects in different programming languages because you can easily download multiple libraries from the Internet to start working on this editor.

This tutorial is an excellent guide to install Visual Studio Code on Raspberry Pi OS easily.

How to Install Visual Studio Code on Raspberry Pi OS

Since Visual Studio Code is a lightweight source editor, you can run it smoothly on your Raspberry Pi device. However, to begin the installation first, you must update current packages on your system using the following command:

$ sudo apt update && sudo apt full-upgrade -y

After completing the package upgrade, you are good to install Visual Studio Code on Raspberry Pi and you can follow the below two methods to install it on your Raspberry Pi system:

  • Install Visual Studio Code from Raspberry Pi Repository
  • Install Visual Studio Code from Recommended Software Option

1: Install Visual Studio Code from Raspberry Pi Repository

You can directly install the latest version of Visual Studio Code from the official Raspberry Pi repository using the below-mentioned command:

$ sudo apt install code -y

After the installation, ensures that you have install the latest version of Visual Studio Code on your system because the latest version comes up with enhanced features.

$ code --version

2: Install Visual Studio Code from Recommended Software Option

Since Visual Studio Code is an efficient programming tool, the Raspberry Pi developers include its installation in the Recommended Software Option of the Raspberry Pi. To open this option, go to your Raspberry Pi main menu and you will find this option in the “Preferences” section.

You will find “Visual Studio Code” in the “All Programs” section. Follow the onscreen instruction for installing the IDE on your Raspberry Pi system.

Run Visual Studio Code on Raspberry Pi

There are two ways to run Visual Studio Code on Raspberry Pi, either you can run it from the “Programming” section of the main menu, or you can run it directly from the Raspberry Pi terminal using the “code” command.

Remove Visual Studio Code from Raspberry Pi

To remove Visual Studio Code from the Raspberry Pi repository, you should apply the following command:

$ sudo apt remove code -y

Conclusion

Visual Studio Code is an efficient source code editor that allows you to write code in multiple programming languages, such as Python, Java, JavaScript and more. You can install this editor either from the official Raspberry Pi repository or through Recommended Software Option available in the Raspberry Pi main menu. Once you are done with Visual Code installation, you can run the editor either from the terminal or desktop using the Programming section from the main menu.

About the author

Awais Khan

I'm an Engineer and an academic researcher by profession. My interest for Raspberry Pi, embedded systems and blogging has brought me here to share my knowledge with others.