Linux installation Vscode

Source: Internet
Author: User
Tags inotify install node arch linux

To scroll through the installation vscode you need to add the source and then install

Take CentOS for example:

sudo rpm--import https://packages.microsoft.com/keys/microsoft.ascsudo sh-c ' echo-e "[Code]\nname=visual Studio code\ nbaseurl=https://packages.microsoft.com/yumrepos/vscode\nenabled=1\ngpgcheck=1\ngpgkey=https:// Packages.microsoft.com/keys/microsoft.asc ">/etc/yum.repos.d/vscode.repo ' #hen update the package cache and install The package using DNF (Fedora, above):d NF Check-updatesudo DNF install Code#or on older versions using Yum:yum check -updatesudo Yum Install code

Running VS Code on Linuxinstallationdebian and Ubuntu based distributions

The easiest-to-install for Debian/ubuntu based distributions-to-download and install the. Deb Package (64-bit) eith Er through the graphical Software center if it ' s available or through the command line with:

-f # Install dependencies

Installing the. deb package would automatically install the APT repository and signing key to enable auto-updating using th e Regular system mechanism. Note that 32-bit and. tar.gz binaries is also available on the download page.

The repository and key can also is installed manually with the following script:

‘echo "deb [arch=amd64] https://packages.microsoft.com/repos/vscode stable main" > /etc/apt/sources.list.d/vscode.list‘

Then update the "package" and install the package using:

# or code-insiders
RHEL, Fedora and CentOS based distributions

We currently ship the stable 64-bit VS Code in a yum repository, the following script would install the key and repository:

‘echo -e "[code]\nname=Visual Studio Code\nbaseurl=https://packages.microsoft.com/yumrepos/vscode\nenabled=1\ngpgcheck=1\ngpgkey=https://packages.microsoft.com/keys/microsoft.asc" > /etc/yum.repos.d/vscode.repo‘

Then update the package cache and install the package using dnf (Fedora and above):

dnf check-updatesudo dnf install code

Or on older versions using yum :

yum check-updatesudo yum install code
OpenSUSE and SLE based distributions

The Yum repository above also works for OpenSUSE and SLE based systems, the following script would install the key and repo Sitory:

‘echo -e "[code]\nname=Visual Studio Code\nbaseurl=https://packages.microsoft.com/yumrepos/vscode\nenabled=1\ntype=rpm-md\ngpgcheck=1\ngpgkey=https://packages.microsoft.com/keys/microsoft.asc" > /etc/zypp/repos.d/vscode.repo‘

Then update the "package" and install the package using:

sudo zypper refreshsudo zypper install code
AUR Package for Arch Linux

There is a community maintained Arch User Repository (AUR), package for VS Code.

Nix Package for Nixos (or any Linux distribution using Nix Package Manager)

There is a community maintained Nix package in the nixpkgs repository. In order to install the IT using Nix, set allowUnfree option to true in your and config.nix execute:

nix-env -i vscode
Installing. RPM Package Manually

The. RPM Package (64-bit) can also is manually downloaded and installed, however Auto-updating won ' t work unless the repos Itory above is installed. Once downloaded it can be installed using your The Package manager, for example with dnf :

sudo dnf install <file>.rpm

Note that 32-bit and. tar.gz binaries is also available on the download page.

Updates

VS Code ships Monthly and you can see when a new release was available by checking Updates. If the VS Code repository is installed correctly, then your System Package Manager should handle auto-updating in the SAM e-Packages on the system.

node. js

node. JS is a popular platform and runtime for easily building and running JavaScript applications. It also includes NPM, a package Manager for node. JS modules. You'll see node. js and NPM mentioned frequently in our documentation and some optional VS Code tooling requires node. JS (f or example, the VS Code extension generator).

If you ' d like to install node. js on Linux, see Installing node. js via Package Manager to find the node. js Package and Inst Allation instructions tailored to your Linux distribution.

To learn more about JavaScript and node. js, see our node. js Tutorial where you'll learn about running and debugging NODE.J s applications with VS Code.

Setting VS Code as the default text Editorxdg-open

You can set the default text editor for text files () which is used by with the text/plain xdg-open following command:

xdg-mime default code.desktop text/plain
Debian Alternatives System

debian-based distributions allow setting a default editor using the alternatives system, without concern for the MIME type. You can set this by running the following and selecting Code.

sudo update-alternatives --set editor /usr/bin/code
Next Steps

Once you have installed vs code, these topics would help you learn more about VS code:

    • Additional Components-learn How to install Git, node. js, TypeScript and tools like Yeoman.
    • User interface-a Quick orientation to VS Code.
    • User/workspace Settings-learn How to configure VS Code to your preferences through Settings.
Common Questionsazure VM Issues

I ' m getting a "Running without the SUID sandbox" error?

You can safely ignore this error.

Debian and moving Files to Trash

If you see a error when deleting files from the VS Code Explorer on the Debian operating system, it might is because the Trash implementation that VS Code are using is not there.

Run These commands to solve this issue:

sudo apt-get install gvfs-bin
Error ENOSPC

When you see this error, it indicates the VS Code file watcher are running out of handles. The current limit can is viewed by running:

cat /proc/sys/fs/inotify/max_user_watches

The limit can be increased to its maximum by editing and adding the the end of the /etc/sysctl.conf file:

fs.inotify.max_user_watches=524288

The new value can then is loaded in by running sudo sysctl -p . Note that the Arch Linux works a little differently, view this page for advice.

While 524288 are the maximum number of files that can be watched, if you ' re in an environment that's particularly memory C Onstrained, wish to lower the number. Each file watch takes up 540 bytes (32-bit) or ~1kb (64-bit), so assuming, all 524288 watches is consumed that result s in an upper bound of around 256MB (32-bit) or 512MB (64-bit).

I can ' t see Chinese characters in Ubuntu

We ' re working on a fix. In the meantime, open the Application menu, then choose File > Preferences > Settings. Then set as editor.fontFamily shown:

    "editor.fontFamily": "Droid Sans Mono, Droid Sans Fallback"
Package git isn't installed

This error can appear during installation and was typically caused by the package manager's being out of date. Try updating it and installing again:

# For .debsudo apt-get update# For .rpm (Fedora 21 and below)sudo yum update# For .rpm (Fedora 22 and above)sudo dnf update
The Code Bin command does not bring the windows to the foreground on Ubuntu

Running ' code. ' on Ubuntu when vs code are already open in the current directory would not be bring vs code into the Foregroun D. The feature of the OS which can be disabled using ccsm .

# Installsudo apt-get updatesudo apt-get install compizconfig-settings-manager# Runccsm

Under general > General Options > Focus & Raise behaviour, set "Focus prevention leve L "to" Off ". Remember This is a os-level setting that would apply to all applications, not just VS Code.

Linux installation Vscode

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.