{"id":22212,"date":"2024-04-21T00:34:35","date_gmt":"2024-04-20T21:34:35","guid":{"rendered":"https:\/\/kifarunix.com\/?p=22212"},"modified":"2024-04-21T00:37:01","modified_gmt":"2024-04-20T21:37:01","slug":"how-to-install-vs-code-on-ubuntu-24-04","status":"publish","type":"post","link":"https:\/\/kifarunix.com\/how-to-install-vs-code-on-ubuntu-24-04\/","title":{"rendered":"How to Install VS Code on Ubuntu 24.04"},"content":{"rendered":"\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"1052\" height=\"588\" src=\"https:\/\/kifarunix.com\/wp-content\/uploads\/2024\/04\/install-visual-studio-code-ubuntu.png?v=1713648727\" alt=\"install visual studio code on Linux\" class=\"wp-image-22219\" title=\"\" srcset=\"https:\/\/kifarunix.com\/wp-content\/uploads\/2024\/04\/install-visual-studio-code-ubuntu.png?v=1713648727 1052w, https:\/\/kifarunix.com\/wp-content\/uploads\/2024\/04\/install-visual-studio-code-ubuntu-768x429.png?v=1713648727 768w\" sizes=\"(max-width: 1052px) 100vw, 1052px\" \/><\/figure>\n\n\n\n<p>In this tutorial, you will learn how to install VS Code on Ubuntu 24.04. <a href=\"https:\/\/code.visualstudio.com\/\" target=\"_blank\" rel=\"noreferrer noopener\">VS Code<\/a>, an acronym for Visual Studio code is a free and lightweight source code editor developed by Microsoft that is used by programmers to edit, debug and manage their source codes. VS Code support <a href=\"https:\/\/code.visualstudio.com\/docs\/languages\/overview#_language-specific-documentation\" target=\"_blank\" rel=\"noreferrer noopener\">various programming languages<\/a>. If you are a programmer and you are running an Ubuntu 24.04 desktop system, it would really be handy to have VS Code installed.<\/p>\n\n\n\n<div class=\"wp-block-rank-math-toc-block\" id=\"rank-math-toc\"><h2>Table of Contents<\/h2><nav><ul><li><a href=\"#installing-visual-studio-code-on-ubuntu-24-04\">Installing Visual Studio Code on Ubuntu 24.04<\/a><ul><li><a href=\"#install-vs-code-on-ubuntu-fro-ms-code-apt-repository\">Install VS Code on Ubuntu fro MS Code APT Repository<\/a><\/li><li><a href=\"#installing-vs-code-using-prebuilt-debian-binary\">Installing VS Code using Prebuilt Debian Binary<\/a><\/li><li><a href=\"#installing-vs-code-via-snap-store\">Installing VS Code via Snap store<\/a><\/li><li><a href=\"#install-code-from-flathub\">Install Code from Flathub<\/a><\/li><li><a href=\"#launching-vs-code-on-ubuntu-24-04\">Launching VS Code on Ubuntu 24.04<\/a><\/li><li><a href=\"#getting-started-with-vs-code\">Getting Started with VS Code<\/a><\/li><\/ul><\/li><\/ul><\/nav><\/div>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"installing-visual-studio-code-on-ubuntu-24-04\">Installing Visual Studio Code on Ubuntu 24.04<\/h2>\n\n\n\n<p>There are multiple ways in which one can use to install VS Code on an Ubuntu 24.04 box. These include;<\/p>\n\n\n\n<ol class=\"wp-block-list\">\n<li>Install VS Code from Microsoft Code APT Repository<\/li>\n\n\n\n<li>Installing VS Code using Prebuilt Debian Binary<\/li>\n\n\n\n<li>Install from Snapstore<\/li>\n\n\n\n<li>Installing from Flathub<\/li>\n<\/ol>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"install-vs-code-on-ubuntu-fro-ms-code-apt-repository\">Install VS Code on Ubuntu fro MS Code APT Repository<\/h3>\n\n\n\n<p>Microsoft maintains a repository for distributing packages related to Visual Studio Code (VS Code). You need to install this repository on Ubuntu 24.04 system.<\/p>\n\n\n\n<p>Therefore, run system package cache update;<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>sudo apt update &amp;&amp; sudo apt upgrade -y<\/code><\/pre>\n\n\n\n<p>Reboot if needed;<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>&#91; -f \/var\/run\/reboot-required ] &amp;&amp; sudo systemctl reboot<\/code><\/pre>\n\n\n\n<p> install some required packages.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>sudo apt install wget gnupg2 apt-transport-https<\/code><\/pre>\n\n\n\n<p>Install repository signing GPG key;<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>wget -qO- https:\/\/packages.microsoft.com\/keys\/microsoft.asc | sudo gpg --dearmor -o \/etc\/apt\/trusted.gpg.d\/microsoft.gpg<\/code><\/pre>\n\n\n\n<p>Then install the repository itself;<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>echo \"deb &#91;arch=amd64] https:\/\/packages.microsoft.com\/repos\/code stable main\" | sudo tee \/etc\/apt\/sources.list.d\/vscode.list<\/code><\/pre>\n\n\n\n<p>Run system update and install VS Code on Ubuntu;<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>sudo apt update<\/code><\/pre>\n\n\n\n<pre class=\"wp-block-code\"><code>sudo apt install code<\/code><\/pre>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"installing-vs-code-using-prebuilt-debian-binary\">Installing VS Code using Prebuilt Debian Binary<\/h3>\n\n\n\n<p>You can download <a href=\"https:\/\/go.microsoft.com\/fwlink\/?LinkID=760868\" target=\"_blank\" rel=\"noreferrer noopener\"> prebuilt debian binary<\/a> from the <a href=\"https:\/\/code.visualstudio.com\/Download\" target=\"_blank\" rel=\"noreferrer noopener\">downloads<\/a> page.<\/p>\n\n\n\n<p>Or simply get the download link address and pull down the binary using wget or curl command.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>wget https:\/\/vscode.download.prss.microsoft.com\/dbazure\/download\/stable\/e170252f762678dec6ca2cc69aba1570769a5d39\/code_1.88.1-1712771838_amd64.deb<\/code><\/pre>\n\n\n\n<p>The install it;<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>sudo apt update &amp;&amp; sudo apt upgrade -y<\/code><\/pre>\n\n\n\n<p>Reboot if required.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>&#91; -f \/var\/run\/reboot-required ] &amp;&amp; sudo systemctl reboot<\/code><\/pre>\n\n\n\n<p>Then install VS Code using prebuilt binary;<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>sudo apt install .\/code_1.88.1-1712771838_amd64.deb<\/code><\/pre>\n\n\n\n<p><a href=\"https:\/\/kifarunix.com\/how-to-install-vs-code-on-ubuntu-24-04\/#launching-vs-code-on-ubuntu-24-04\" target=\"_blank\" rel=\"noreferrer noopener\">Launching VS Code<\/a><\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"installing-vs-code-via-snap-store\">Installing VS Code via Snap store<\/h3>\n\n\n\n<p>VS Code is also distributed on Snap store. Since snap is already installed on Ubuntu 24.04, you can simply install the code using the command below;<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>sudo snap install --classic code<\/code><\/pre>\n\n\n\n<p><a href=\"https:\/\/kifarunix.com\/how-to-install-vs-code-on-ubuntu-24-04\/#launching-vs-code-on-ubuntu-24-04\" target=\"_blank\" rel=\"noreferrer noopener\">Launch VS Code<\/a><\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"install-code-from-flathub\">Install Code from Flathub<\/h3>\n\n\n\n<p>VS Code is also distributed in Flathub. To install it from Flathub on Ubuntu 24.04;<\/p>\n\n\n\n<p>Install Flatpak package manager;<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>sudo apt install flatpak<\/code><\/pre>\n\n\n\n<p>Enable Flathub repository;<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>sudo flatpak remote-add --if-not-exists flathub https:\/\/dl.flathub.org\/repo\/flathub.flatpakrepo<\/code><\/pre>\n\n\n\n<p>Get VS Code app ID from the repository;<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>sudo flatpak search code | grep \"Visual Studio Code\"<\/code><\/pre>\n\n\n\n<pre class=\"scroll-box\"><code>Visual Studio Code\tCode editing. Redefined.\tcom.visualstudio.code\t1.88.0\tstable\tflathub\nCode - OSS\tVisual Studio Code. Code editing. Redefined.\tcom.visualstudio.code-oss\t1.74.3\tstable\tflathub\n<\/code><\/pre>\n\n\n\n<p>So the VS Code Flathub app ID is <strong>com.visualstudio.code<\/strong>.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>sudo flatpak install com.visualstudio.code<\/code><\/pre>\n\n\n\n<pre class=\"scroll-box\"><code>Looking for matches\u2026\nRequired runtime for com.visualstudio.code\/x86_64\/stable (runtime\/org.freedesktop.Sdk\/x86_64\/23.08) found in remote flathub\nDo you want to install it? [Y\/n]: y\n\ncom.visualstudio.code permissions:\n    ipc          network                pulseaudio             ssh-auth                      x11            devices\n    devel        file access [1]        dbus access [2]        system dbus access [3]        tags [4]\n\n    [1] host\n    [2] com.canonical.AppMenu.Registrar, com.canonical.AppMenu.Registrar.*, org.freedesktop.Flatpak, org.freedesktop.Notifications, org.freedesktop.secrets\n    [3] org.freedesktop.login1\n    [4] proprietary\n\n\n        ID                                             Branch                 Op            Remote             Download\n 1. [\u2713] org.freedesktop.Platform.GL.default            23.08                  i             flathub            164.6\u00a0MB \/ 164.6\u00a0MB\n 2. [\u2713] org.freedesktop.Platform.GL.default            23.08-extra            i             flathub             18.5\u00a0MB \/ 164.6\u00a0MB\n 3. [\u2713] org.freedesktop.Platform.openh264              2.2.0                  i             flathub            886.7\u00a0kB \/ 944.3\u00a0kB\n 4. [\u2713] org.freedesktop.Sdk.Locale                     23.08                  i             flathub             18.1\u00a0kB \/ 366.1\u00a0MB\n 5. [\u2713] org.freedesktop.Sdk                            23.08                  i             flathub            482.6\u00a0MB \/ 559.5\u00a0MB\n 6. [\u2713] com.visualstudio.code                          stable                 i             flathub            105.9\u00a0MB \/ 107.7\u00a0MB\n\nInstalling 6\/6\u2026 \u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u258d  97%  105.9\u00a0MB\/s\nNote that '\/var\/lib\/flatpak\/exports\/share' is not in the search path\nset by the XDG_DATA_HOME and XDG_DATA_DIRS\n        ID                                             Branch                 Op            Remote             Download\n 1. [\u2713] org.freedesktop.Platform.GL.default            23.08                  i             flathub            164.6\u00a0MB \/ 164.6\u00a0MB\n 2. [\u2713] org.freedesktop.Platform.GL.default            23.08-extra            i             flathub             18.5\u00a0MB \/ 164.6\u00a0MB\n 3. [\u2713] org.freedesktop.Platform.openh264              2.2.0                  i             flathub            886.7\u00a0kB \/ 944.3\u00a0kB\n 4. [\u2713] org.freedesktop.Sdk.Locale                     23.08                  i             flathub             18.1\u00a0kB \/ 366.1\u00a0MB\n 5. [\u2713] org.freedesktop.Sdk                            23.08                  i             flathub            482.6\u00a0MB \/ 559.5\u00a0MB\n 6. [\u2713] com.visualstudio.code                          stable                 i             flathub            105.9\u00a0MB \/ 107.7\u00a0MB\n\nInstallation complete.\n<\/code><\/pre>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"launching-vs-code-on-ubuntu-24-04\">Launching VS Code on Ubuntu 24.04<\/h3>\n\n\n\n<p>Irrespective of the method of installation, you should now be able to launch and use VS Code.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full is-resized\"><img loading=\"lazy\" decoding=\"async\" width=\"1018\" height=\"768\" src=\"https:\/\/kifarunix.com\/wp-content\/uploads\/2024\/04\/launch-vs-code-ubuntu24.04.png?v=1713647706\" alt=\"Install VS Code on Ubuntu 24.04\" class=\"wp-image-22215\" style=\"width:820px;height:auto\" title=\"\" srcset=\"https:\/\/kifarunix.com\/wp-content\/uploads\/2024\/04\/launch-vs-code-ubuntu24.04.png?v=1713647706 1018w, https:\/\/kifarunix.com\/wp-content\/uploads\/2024\/04\/launch-vs-code-ubuntu24.04-768x579.png?v=1713647706 768w\" sizes=\"(max-width: 1018px) 100vw, 1018px\" \/><\/figure>\n\n\n\n<p>You can also launch from command line. If you installed VS Code using APT\/Snap, run the command <strong>code<\/strong> from the terminal;<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>code<\/code><\/pre>\n\n\n\n<p>If you installed from Flathub, check installed apps and launch;<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>flatpak list<\/code><\/pre>\n\n\n\n<pre class=\"wp-block-code\"><code>flatpak run com.visualstudio.code<\/code><\/pre>\n\n\n\n<p>Next, get started by selecting your theme and enable other options and mark done.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"1029\" height=\"767\" src=\"https:\/\/kifarunix.com\/wp-content\/uploads\/2024\/04\/setup-vs-code-ubuntu.png?v=1713647996\" alt=\"\" class=\"wp-image-22216\" title=\"\" srcset=\"https:\/\/kifarunix.com\/wp-content\/uploads\/2024\/04\/setup-vs-code-ubuntu.png?v=1713647996 1029w, https:\/\/kifarunix.com\/wp-content\/uploads\/2024\/04\/setup-vs-code-ubuntu-768x572.png?v=1713647996 768w\" sizes=\"(max-width: 1029px) 100vw, 1029px\" \/><\/figure>\n\n\n\n<p>Get started with VS Code;<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"1023\" height=\"738\" src=\"https:\/\/kifarunix.com\/wp-content\/uploads\/2024\/04\/get-started-with-vs-code.png?v=1713648038\" alt=\"\" class=\"wp-image-22217\" title=\"\" srcset=\"https:\/\/kifarunix.com\/wp-content\/uploads\/2024\/04\/get-started-with-vs-code.png?v=1713648038 1023w, https:\/\/kifarunix.com\/wp-content\/uploads\/2024\/04\/get-started-with-vs-code-768x554.png?v=1713648038 768w\" sizes=\"(max-width: 1023px) 100vw, 1023px\" \/><\/figure>\n\n\n\n<p>And that is how simple it is to install VS Code on Ubuntu 24.04.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"getting-started-with-vs-code\">Getting Started with VS Code<\/h3>\n\n\n\n<p>You can now <a href=\"https:\/\/code.visualstudio.com\/docs\" target=\"_blank\" rel=\"noreferrer noopener\">get started with VS Code<\/a>.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>In this tutorial, you will learn how to install VS Code on Ubuntu 24.04. VS Code, an acronym for Visual Studio code is a free<\/p>\n","protected":false},"author":10,"featured_media":22219,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"rank_math_lock_modified_date":false,"footnotes":""},"categories":[121],"tags":[],"class_list":["post-22212","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-howtos","generate-columns","tablet-grid-50","mobile-grid-100","grid-parent","grid-50","resize-featured-image"],"_links":{"self":[{"href":"https:\/\/kifarunix.com\/wp-json\/wp\/v2\/posts\/22212"}],"collection":[{"href":"https:\/\/kifarunix.com\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/kifarunix.com\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/kifarunix.com\/wp-json\/wp\/v2\/users\/10"}],"replies":[{"embeddable":true,"href":"https:\/\/kifarunix.com\/wp-json\/wp\/v2\/comments?post=22212"}],"version-history":[{"count":6,"href":"https:\/\/kifarunix.com\/wp-json\/wp\/v2\/posts\/22212\/revisions"}],"predecessor-version":[{"id":22223,"href":"https:\/\/kifarunix.com\/wp-json\/wp\/v2\/posts\/22212\/revisions\/22223"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/kifarunix.com\/wp-json\/wp\/v2\/media\/22219"}],"wp:attachment":[{"href":"https:\/\/kifarunix.com\/wp-json\/wp\/v2\/media?parent=22212"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/kifarunix.com\/wp-json\/wp\/v2\/categories?post=22212"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/kifarunix.com\/wp-json\/wp\/v2\/tags?post=22212"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}