{"id":128,"date":"2017-05-21T02:40:03","date_gmt":"2017-05-21T05:40:03","guid":{"rendered":"https:\/\/www.linuxpro.com.br\/2017\/05\/instalando-visualstudio-no-ubuntu\/"},"modified":"2026-09-08T02:41:28","modified_gmt":"2026-09-08T05:41:28","slug":"instalando-visualstudio-no-ubuntu","status":"publish","type":"post","link":"https:\/\/www.linuxpro.com.br\/en\/2017\/05\/instalando-visualstudio-no-ubuntu\/","title":{"rendered":"Installing Visual Studio Code on Ubuntu"},"content":{"rendered":"<p><img loading=\"lazy\" decoding=\"async\" alt=\"Mascote do LinuxPro digitando no teclado diante do editor de c\u00f3digo, com o logo do Visual Studio Code ao lado\" src=\"\/wp-content\/uploads\/2026\/09\/vscode-v4.webp\" width=\"1052\" height=\"652\" \/><\/p>\n<div style=\"background:#fff8e1;border-left:4px solid #8b1a1a;padding:.8em 1em;margin:1em 0\"><strong>Note (2026):<\/strong> the original post, from 2017, installed VS Code by downloading a <code data-no-translation=\"\">.deb<\/code> standalone file and mixed up two different products. It has been rewritten: the correct method today is the <strong>official apt repository<\/strong>, which updates along with the system \u2014 and it is worth knowing there is an alternative build without telemetry.<\/div>\n<p>The <strong>Visual Studio Code<\/strong> is the most widely used editor in the world, runs well on Linux and is free. This guide shows how to install it in a way that stays up to date automatically, what to do next and the difference between the Microsoft binary and <strong>VSCodium<\/strong>.<\/p>\n<p><!-- more --><\/p>\n<h2>First: VS Code is not Visual Studio<\/h2>\n<p>The names are confusing, but they are different products:<\/p>\n<ul>\n<li><strong>Visual Studio Code<\/strong> \u2014 a lightweight, cross-platform code editor, written in TypeScript on Electron. This is the one that runs on Linux.<\/li>\n<li><strong>Visual Studio<\/strong> (without \u201cCode\u201d) \u2014 Microsoft\u2019s heavyweight IDE for .NET, C++ and C#, in Community, Professional and Enterprise editions. It <strong>does not exist for Linux<\/strong>. Anyone who needs .NET on Linux uses the SDK from the command line \u2014 the topic of the post <a href=\"\/en\/2026\/09\/instalando-dotnet-10-no-linux\/\">installing .NET on Linux<\/a> \u2014 with VS Code on top.<\/li>\n<\/ul>\n<h2>Installing from the official repository (recommended)<\/h2>\n<p>This is the right path: register the Microsoft repository, and from then on the editor updates along with the system\u2019s `apt upgrade`, without hunting for a new `.deb` for each version.<\/p>\n<pre data-no-translation=\"\"><code class=\"language-bash\" data-no-translation=\"\">sudo apt install wget gpg\n\nwget -qO- https:\/\/packages.microsoft.com\/keys\/microsoft.asc \n  | sudo gpg --dearmor -o \/usr\/share\/keyrings\/microsoft.gpg\n<\/code><\/pre>\n<p>Now the repository file. Recent distributions use the format <code data-no-translation=\"\">deb822<\/code>, more readable than the old single line:<\/p>\n<pre data-no-translation=\"\"><code class=\"language-bash\" data-no-translation=\"\">sudo tee \/etc\/apt\/sources.list.d\/vscode.sources &gt; \/dev\/null &lt;&lt;'FIM'\nTypes: deb\nURIs: https:\/\/packages.microsoft.com\/repos\/code\nSuites: stable\nComponents: main\nArchitectures: amd64,arm64,armhf\nSigned-By: \/usr\/share\/keyrings\/microsoft.gpg\nFIM\n\nsudo apt update\nsudo apt install code\n<\/code><\/pre>\n<p>Notice <code data-no-translation=\"\">Architectures<\/code>: in addition to the usual <code data-no-translation=\"\">amd64<\/code> , the repository serves <code data-no-translation=\"\">arm64<\/code>. In other words, it works on a Raspberry Pi 4\/5 with 64 bits and on ARM servers, not just on PCs.<\/p>\n<h2>Other methods<\/h2>\n<pre data-no-translation=\"\"><code class=\"language-bash\" data-no-translation=\"\"># snap (vem pronto no Ubuntu)\nsudo snap install --classic code\n\n# flatpak, pela Flathub\nflatpak install flathub com.visualstudio.code\n\n# .deb avulso, quando voc\u00ea precisa de uma vers\u00e3o espec\u00edfica\nsudo apt install .\/code_1.XX.X_amd64.deb\n<\/code><\/pre>\n<p>The <code data-no-translation=\"\">--classic<\/code> in snap is not decorative: without it the editor is confined and cannot see your files or the compilers installed on the system. Flatpak has the same sandbox limitation and requires granting folder access \u2014 for an editor, which needs to reach the entire project and build tools, the apt repository remains the path of least resistance.<\/p>\n<h2>VSCodium: the same editor, without telemetry<\/h2>\n<p>Here is the part the 2017 post did not mention. The VS Code source code is on <a href=\"https:\/\/github.com\/microsoft\/vscode\">github.com\/microsoft\/vscode<\/a> under <strong>MIT license<\/strong>. But the binary Microsoft distributes is not just that compiled code: at build time it adds what its own documentation calls \u201cMicrosoft-specific functionality\u201d \u2014 <strong>telemetry, the extension gallery and branding<\/strong> \u2014 and distributes it under a proprietary license.<\/p>\n<p>The <a href=\"https:\/\/vscodium.com\/\">VSCodium<\/a> is exactly the same source code compiled <em>without<\/em> those additions: MIT binary, telemetry disabled. Install it the same way:<\/p>\n<pre data-no-translation=\"\"><code class=\"language-bash\" data-no-translation=\"\">wget -qO- https:\/\/gitlab.com\/paulcarroty\/vscodium-deb-rpm-repo\/raw\/master\/pub.gpg \n  | gpg --dearmor \n  | sudo dd of=\/usr\/share\/keyrings\/vscodium-archive-keyring.gpg\n\nsudo tee \/etc\/apt\/sources.list.d\/vscodium.sources &gt; \/dev\/null &lt;&lt;'FIM'\nTypes: deb\nURIs: https:\/\/download.vscodium.com\/debs\nSuites: vscodium\nComponents: main\nArchitectures: amd64 arm64\nSigned-by: \/usr\/share\/keyrings\/vscodium-archive-keyring.gpg\nFIM\n\nsudo apt update\nsudo apt install codium\n<\/code><\/pre>\n<p>The trade-off: the official Microsoft marketplace has terms of use that only allow its own client, so VSCodium points to <strong>Open VSX<\/strong>, an open catalog. Most popular extensions are there, but some \u2014 generally Microsoft\u2019s own, such as those for C++ and remote access \u2014 are not. Before migrating, check whether the extension you depend on exists on Open VSX.<\/p>\n<h2>After installation<\/h2>\n<p>The first practical benefit is opening a project directly from the terminal, without going through the file manager:<\/p>\n<pre data-no-translation=\"\"><code class=\"language-bash\" data-no-translation=\"\">code .                    # abre a pasta atual como projeto\ncode arquivo.py           # abre um arquivo\ncode --diff a.txt b.txt   # compara dois arquivos lado a lado\ncode --list-extensions    # o que voc\u00ea j\u00e1 tem instalado\n<\/code><\/pre>\n<p>Extensions from the command line, useful for reproducing your environment on a new machine:<\/p>\n<pre data-no-translation=\"\"><code class=\"language-bash\" data-no-translation=\"\">code --install-extension ms-python.python\ncode --install-extension golang.go\ncode --install-extension rust-lang.rust-analyzer\n\n# levar sua lista para outra m\u00e1quina\ncode --list-extensions &gt; extensoes.txt\nxargs -n1 code --install-extension &lt; extensoes.txt\n<\/code><\/pre>\n<p>And the feature that turns the editor into a server administration tool: <strong>Remote \u2014 SSH<\/strong>. With it you open a folder on a remote server and edit as though it were local \u2014 with syntax highlighting, an integrated terminal and a debugger running <em>there<\/em>, not here. For anyone who administers Linux machines over SSH, it is the difference between editing YAML in <code data-no-translation=\"\">vim<\/code> over a slow connection and having the entire project open on screen.<\/p>\n<pre data-no-translation=\"\"><code class=\"language-bash\" data-no-translation=\"\">code --install-extension ms-vscode-remote.remote-ssh\n# depois: F1 \u2192 \"Remote-SSH: Connect to Host\" \u2192 usa o seu ~\/.ssh\/config\n<\/code><\/pre>\n<p>It reads your <code data-no-translation=\"\">~\/.ssh\/config<\/code>, so the host aliases you already use appear in the list. This is one of the extensions not on Open VSX \u2014 a concrete case where Microsoft\u2019s build wins over VSCodium.<\/p>\n<h2>Shortcuts worth learning<\/h2>\n<ul>\n<li><code data-no-translation=\"\">Ctrl+P<\/code> \u2014 open a file by name without taking your hands off the keyboard<\/li>\n<li><code data-no-translation=\"\">Ctrl+Shift+P<\/code> \u2014 the command palette: everything the editor can do, searchable by text<\/li>\n<li><code data-no-translation=\"\">Ctrl+`<\/code> \u2014 toggle the integrated terminal<\/li>\n<li><code data-no-translation=\"\">Ctrl+Shift+F<\/code> \u2014 search all project files<\/li>\n<li><code data-no-translation=\"\">F2<\/code> \u2014 rename a symbol throughout the project, respecting scope<\/li>\n<li><code data-no-translation=\"\">Alt+clique<\/code> \u2014 multiple cursors, to edit several lines at once<\/li>\n<\/ul>\n<h2>To keep going<\/h2>\n<ul>\n<li><a href=\"\/en\/2026\/09\/instalando-dotnet-10-no-linux\/\">Installing .NET on Linux<\/a> \u2014 the SDK that replaces Visual Studio here<\/li>\n<li><a href=\"\/en\/2026\/09\/assistentes-de-ia-no-terminal-linux\/\">AI assistants on the Linux terminal<\/a><\/li>\n<li><a href=\"\/en\/2017\/05\/instalando-golang-no-linux\/\">Go on Ubuntu<\/a> and <a href=\"\/en\/2017\/04\/hello-world\/\">Rust on Ubuntu<\/a> \u2014 two languages with good editor extensions<\/li>\n<li><a href=\"https:\/\/code.visualstudio.com\/docs\/setup\/linux\">Official Linux installation documentation<\/a> \u00b7 <a href=\"https:\/\/vscodium.com\/\">VSCodium<\/a> \u00b7 <a href=\"https:\/\/open-vsx.org\/\">Open VSX<\/a><\/li>\n<\/ul>","protected":false},"excerpt":{"rendered":"<p>Visual Studio Code is the world\u2019s most widely used editor, runs well on Linux, and is free. This guide shows how to install it so it stays up to date automatically, what to do right afterward, and what the difference is \u2026 <a title=\"Installing Visual Studio Code on Ubuntu\" class=\"read-more\" href=\"https:\/\/www.linuxpro.com.br\/en\/2017\/05\/instalando-visualstudio-no-ubuntu\/\" aria-label=\"Read more about Instalando o Visual Studio Code no Ubuntu\">Read more<\/a><\/p>","protected":false},"author":0,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[45,2,3],"tags":[405,14,262,397,5,404,406],"class_list":["post-128","post","type-post","status-publish","format-standard","hentry","category-desenv","category-linux","category-ubuntu","tag-editor","tag-howto","tag-microsoft","tag-programacao","tag-ubuntu","tag-vscode","tag-vscodium"],"_links":{"self":[{"href":"https:\/\/www.linuxpro.com.br\/en\/wp-json\/wp\/v2\/posts\/128","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.linuxpro.com.br\/en\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.linuxpro.com.br\/en\/wp-json\/wp\/v2\/types\/post"}],"replies":[{"embeddable":true,"href":"https:\/\/www.linuxpro.com.br\/en\/wp-json\/wp\/v2\/comments?post=128"}],"version-history":[{"count":6,"href":"https:\/\/www.linuxpro.com.br\/en\/wp-json\/wp\/v2\/posts\/128\/revisions"}],"predecessor-version":[{"id":1084,"href":"https:\/\/www.linuxpro.com.br\/en\/wp-json\/wp\/v2\/posts\/128\/revisions\/1084"}],"wp:attachment":[{"href":"https:\/\/www.linuxpro.com.br\/en\/wp-json\/wp\/v2\/media?parent=128"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.linuxpro.com.br\/en\/wp-json\/wp\/v2\/categories?post=128"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.linuxpro.com.br\/en\/wp-json\/wp\/v2\/tags?post=128"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}