{"id":12917,"date":"2021-12-20T12:54:32","date_gmt":"2021-12-20T12:54:32","guid":{"rendered":"https:\/\/linuxways.net\/?p=12917"},"modified":"2021-12-20T12:54:32","modified_gmt":"2021-12-20T12:54:32","slug":"install-visual-studio-code-on-linux-mint-20","status":"publish","type":"post","link":"https:\/\/linuxways.net\/de\/mint\/install-visual-studio-code-on-linux-mint-20\/","title":{"rendered":"Install Visual Studio Code on Linux Mint 20"},"content":{"rendered":"<p><a href=\"https:\/\/code.visualstudio.com\/\">Visual Studio Code<\/a>, also colloquially referred to as VS Code, is a free and cross-platform code editor from the Microsoft Company. It\u2019s an extremely popular code editor thanks to its neat and user-friendly UI and a wide selection of features and numerous plugins which extend its functionality. VS Code supports a wide selection of languages such as Python, Java, C, C++, Go, Lua, PHP, JavaScript, TypeScript and so much more. It even supports frontend languages such as HTML, and CSS.<\/p>\n<p>There are two main ways of installing VS Code on Mint 20. Let\u2019s have a look at each of them.<\/p>\n<h2><strong>Install Microsoft Visual Studio Code using snap<\/strong><\/h2>\n<p>This is by far the juiciest way of installing VS Code on Mint 20. To get off the ground, launch your terminal and update the package Index on your Mint 20 installation as follows:<\/p>\n<pre><strong>$ sudo apt update -y <\/strong><\/pre>\n<p>Once the system is up to date, the next step will be to enable snap on Mint 20 since Mint 20, by default, does not come with snap enabled.<\/p>\n<p>Before you do so, remove the <strong>nosnap.pref<\/strong> file.<\/p>\n<pre><strong>$ sudo rm \/etc\/apt\/preferences.d\/nosnap.pref<\/strong><\/pre>\n<p>Once again, refresh the package index.<\/p>\n<pre><strong>$ sudo apt update -y <\/strong><\/pre>\n<p>Next, enable snap on your system. In this case, snap is already installed.<\/p>\n<pre><strong>$ sudo apt install snapd<\/strong><\/pre>\n<p><strong><img loading=\"lazy\" decoding=\"async\" width=\"815\" height=\"211\" class=\"wp-image-12918\" src=\"http:\/\/linuxways.net\/wp-content\/uploads\/2021\/12\/word-image-202.png\" srcset=\"https:\/\/linuxways.net\/wp-content\/uploads\/2021\/12\/word-image-202.png 815w, https:\/\/linuxways.net\/wp-content\/uploads\/2021\/12\/word-image-202-300x78.png 300w, https:\/\/linuxways.net\/wp-content\/uploads\/2021\/12\/word-image-202-768x199.png 768w\" sizes=\"auto, (max-width: 815px) 100vw, 815px\" \/><\/strong><\/p>\n<p>Next, install VS Code using snap as follows.<\/p>\n<pre><strong>$ sudo snap install code \u2013classic<\/strong><\/pre>\n<p><strong><img loading=\"lazy\" decoding=\"async\" width=\"813\" height=\"190\" class=\"wp-image-12919\" src=\"http:\/\/linuxways.net\/wp-content\/uploads\/2021\/12\/word-image-203.png\" srcset=\"https:\/\/linuxways.net\/wp-content\/uploads\/2021\/12\/word-image-203.png 813w, https:\/\/linuxways.net\/wp-content\/uploads\/2021\/12\/word-image-203-300x70.png 300w, https:\/\/linuxways.net\/wp-content\/uploads\/2021\/12\/word-image-203-768x179.png 768w\" sizes=\"auto, (max-width: 813px) 100vw, 813px\" \/><\/strong><\/p>\n<p>With a stable internet connection, this should be a matter of minutes.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" width=\"815\" height=\"162\" class=\"wp-image-12920\" src=\"http:\/\/linuxways.net\/wp-content\/uploads\/2021\/12\/word-image-204.png\" srcset=\"https:\/\/linuxways.net\/wp-content\/uploads\/2021\/12\/word-image-204.png 815w, https:\/\/linuxways.net\/wp-content\/uploads\/2021\/12\/word-image-204-300x60.png 300w, https:\/\/linuxways.net\/wp-content\/uploads\/2021\/12\/word-image-204-768x153.png 768w\" sizes=\"auto, (max-width: 815px) 100vw, 815px\" \/><\/p>\n<p>To verify that VSCode is installed, check its version as shown.<\/p>\n<pre><strong>$ code \u2014-version<\/strong><\/pre>\n<p><img loading=\"lazy\" decoding=\"async\" width=\"814\" height=\"192\" class=\"wp-image-12921\" src=\"http:\/\/linuxways.net\/wp-content\/uploads\/2021\/12\/word-image-205.png\" srcset=\"https:\/\/linuxways.net\/wp-content\/uploads\/2021\/12\/word-image-205.png 814w, https:\/\/linuxways.net\/wp-content\/uploads\/2021\/12\/word-image-205-300x71.png 300w, https:\/\/linuxways.net\/wp-content\/uploads\/2021\/12\/word-image-205-768x181.png 768w\" sizes=\"auto, (max-width: 814px) 100vw, 814px\" \/><\/p>\n<h2><strong>Install Visual Studio Code from the Microsoft repository<\/strong><\/h2>\n<p>The second approach to installing VS Code is by enabling the Official repository for VS Code on the system.<\/p>\n<p>We will start off by installing the dependencies as shown.<\/p>\n<pre><strong>$ sudo apt install curl software-properties-common apt-transport-https <\/strong><\/pre>\n<p>Next, import the GPG signing key by executing the following commands:<\/p>\n<pre><strong>$ curl https:\/\/packages.microsoft.com\/keys\/microsoft.asc | gpg --dearmor &gt; microsoft.gpg<\/strong><\/pre>\n<p>Next, execute the command.<\/p>\n<pre><strong>$ sudo install -o root -g root -m 644 microsoft.gpg \/etc\/apt\/trusted.gpg.d\/<\/strong><\/pre>\n<p><img loading=\"lazy\" decoding=\"async\" width=\"862\" height=\"256\" class=\"wp-image-12922\" src=\"http:\/\/linuxways.net\/wp-content\/uploads\/2021\/12\/word-image-206.png\" srcset=\"https:\/\/linuxways.net\/wp-content\/uploads\/2021\/12\/word-image-206.png 862w, https:\/\/linuxways.net\/wp-content\/uploads\/2021\/12\/word-image-206-300x89.png 300w, https:\/\/linuxways.net\/wp-content\/uploads\/2021\/12\/word-image-206-768x228.png 768w\" sizes=\"auto, (max-width: 862px) 100vw, 862px\" \/><\/p>\n<p>Next, create a repository file and add the VS Code APT repository. Here, the repository is defined in the <strong>vscode.list <\/strong>file inside the <strong>\/etc\/apt\/sources.list.d <\/strong>directory.<\/p>\n<pre><strong>$ sudo sh -c 'echo \"deb [arch=amd64] https:\/\/packages.microsoft.com\/repos\/vscode stable main\" &gt; \/etc\/apt\/sources.list.d\/vscode.list'<\/strong><\/pre>\n<p><strong><img loading=\"lazy\" decoding=\"async\" width=\"854\" height=\"104\" class=\"wp-image-12923\" src=\"http:\/\/linuxways.net\/wp-content\/uploads\/2021\/12\/word-image-207.png\" srcset=\"https:\/\/linuxways.net\/wp-content\/uploads\/2021\/12\/word-image-207.png 854w, https:\/\/linuxways.net\/wp-content\/uploads\/2021\/12\/word-image-207-300x37.png 300w, https:\/\/linuxways.net\/wp-content\/uploads\/2021\/12\/word-image-207-768x94.png 768w\" sizes=\"auto, (max-width: 854px) 100vw, 854px\" \/><\/strong><\/p>\n<p>Then sync the new repository by refreshing your Mint system\u2019s package index.<\/p>\n<pre><strong>$ sudo apt update<\/strong><\/pre>\n<p>Finally, install VSCode on Mint 20 using APT.<\/p>\n<pre><strong>$ sudo apt install code<\/strong><\/pre>\n<p><img loading=\"lazy\" decoding=\"async\" width=\"860\" height=\"260\" class=\"wp-image-12924\" src=\"http:\/\/linuxways.net\/wp-content\/uploads\/2021\/12\/word-image-208.png\" srcset=\"https:\/\/linuxways.net\/wp-content\/uploads\/2021\/12\/word-image-208.png 860w, https:\/\/linuxways.net\/wp-content\/uploads\/2021\/12\/word-image-208-300x91.png 300w, https:\/\/linuxways.net\/wp-content\/uploads\/2021\/12\/word-image-208-768x232.png 768w\" sizes=\"auto, (max-width: 860px) 100vw, 860px\" \/><\/p>\n<p>At this point, VS Code is installed on your Mint system.<\/p>\n<h2><strong>Launching Visual Studio Code<\/strong><\/h2>\n<p>Finally, to launch VS Code, execute:<\/p>\n<pre><strong>$ code &amp;<\/strong><\/pre>\n<p>This launches VS Code in the background and still frees up your terminal. Once launched, you can now get started coding your applications or websites.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" width=\"1029\" height=\"621\" class=\"wp-image-12925\" src=\"http:\/\/linuxways.net\/wp-content\/uploads\/2021\/12\/word-image-209.png\" srcset=\"https:\/\/linuxways.net\/wp-content\/uploads\/2021\/12\/word-image-209.png 1029w, https:\/\/linuxways.net\/wp-content\/uploads\/2021\/12\/word-image-209-300x181.png 300w, https:\/\/linuxways.net\/wp-content\/uploads\/2021\/12\/word-image-209-1024x618.png 1024w, https:\/\/linuxways.net\/wp-content\/uploads\/2021\/12\/word-image-209-768x463.png 768w\" sizes=\"auto, (max-width: 1029px) 100vw, 1029px\" \/><\/p>\n<p>And this wraps up our guide on the installation of VS Code on Linux Mint 20.<\/p>","protected":false},"excerpt":{"rendered":"<p>Visual Studio Code, also colloquially referred to as VS Code, is a free and cross-platform code editor from the Microsoft Company. It\u2019s an extremely popular code editor thanks&hellip;<\/p>","protected":false},"author":1,"featured_media":13243,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[5],"tags":[129,247],"class_list":["post-12917","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-mint","tag-linux-mint-20","tag-visual-studio-code"],"_links":{"self":[{"href":"https:\/\/linuxways.net\/de\/wp-json\/wp\/v2\/posts\/12917","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/linuxways.net\/de\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/linuxways.net\/de\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/linuxways.net\/de\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/linuxways.net\/de\/wp-json\/wp\/v2\/comments?post=12917"}],"version-history":[{"count":0,"href":"https:\/\/linuxways.net\/de\/wp-json\/wp\/v2\/posts\/12917\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/linuxways.net\/de\/wp-json\/wp\/v2\/media\/13243"}],"wp:attachment":[{"href":"https:\/\/linuxways.net\/de\/wp-json\/wp\/v2\/media?parent=12917"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/linuxways.net\/de\/wp-json\/wp\/v2\/categories?post=12917"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/linuxways.net\/de\/wp-json\/wp\/v2\/tags?post=12917"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}