Install VSCode (Visual Studio Code) in the linux system

Install VSCode (Visual Studio Code) in the linux system

1. Download the compressed package from the official website (in other words, you can run it directly after downloading it and decompressing it, no need for make)

Visit the official website of Visual Studio Code  https://code.visualstudio.com/docs?dv=linux64

I am 64 bit:

wget https://az764295.vo.msecnd.net/stable/7ba55c5860b152d999dda59393ca3ebeb1b5c85f/code-stable-code_1.7.2-1479766213_amd64.tar.gz

2. Unzip, if the file name is wrong, it may not be extracted (extension: tar.gz)

tar jxcv code-stable-code_1.7.2-1479766213_amd64.tar.gz

3. Then move to /usr/local/ directory

mv VSCode-linux-x64 /usr/local/

4. You may also need to give executable permissions, and then you can already run

chmod +x /usr/local/VSCode-linux-x64/code

5. Copy a VScode icon file to the /usr/share/icons/ directory (it will be useful later)

cp /usr/local/VSCode-linux-x64/resources/app/resources/linux/code.png /usr/share/icons/

6. Create a launcher, in the /usr/share/applications/ directory, or copy it to the desktop directory

Use the command directly in the interrupt: 

vim /usr/share/applications/VSCode.desktop

Then enter the following text:

copy code
[Desktop Entry]
Name=Visual Studio Code
Comment=Multi-platform code editor for Linux Exec=/usr/local/VSCode-linux-x64/code Icon=/usr/share/icons/code.png Type=Application StartupNotify=true Categories=TextEditor;Development;Utility; MimeType=text/plain;
copy code

After saving and exiting, you can then copy to the desktop:

cp /usr/share/applications/VSCode.desktop ~/desktop/

After that, you will find that the desktop and application menus have shortcuts to VSCode.

8. Open VSCode and load the plugin: cpptools | vscode-icons

OK, other plugins can be installed by yourself, ^,^

 However, the startup of VSCode in the virtual machine is a bit slow~

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=324643535&siteId=291194637