How to install Visual Studio Code in CentOS
To install Visual Studio Code in Centos
Visual Studio Code is a free, code-optimized editor based on electron. It is known for its features Such as navigation, syntax highlighting, bracket matching, auto indentation, intellisense support and snippets. It supports various language. It integrates with the package managers and repositories. Installation of Visual Studio Code is explained in this manual.
To install Visual Studio Code
Create a directory inside the tmp directory, by using the following command.
[root@linuxhelp1 ~]# mkdir /tmp/vscode
[root@linuxhelp1 ~]# cd /tmp/vscode/
Download the visual studio code by using the following command.
[root@linuxhelp1 vscode]# wget https://az764295.vo.msecnd.net/public/0.3.0/VSCode-linux-x64.zip
--2016-09-18 00:44:59-- https://az764295.vo.msecnd.net/public/0.3.0/VSCode-linux-x64.zip
Resolving az764295.vo.msecnd.net (az764295.vo.msecnd.net)... 68.232.45.201, 2606:2800:10c:1ff2:1d06:94b:c0f:14d
Connecting to az764295.vo.msecnd.net (az764295.vo.msecnd.net)|68.232.45.201|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 64992671 (62M) [application/octet-stream]
Saving to: ‘ VSCode-linux-x64.zip’
100%[=================================================================================================> ] 6,49,92,671 145KB/s in 5m 44s
2016-09-18 00:50:44 (185 KB/s) - ‘ VSCode-linux-x64.zip’ saved [64992671/64992671]
Run the following command to extract the downloaded package.
[root@linuxhelp1 vscode]# unzip VSCode-linux-x64.zip -d /opt/
Archive: VSCode-linux-x64.zip
creating: /opt/VSCode-linux-x64/
inflating: /opt/VSCode-linux-x64/libgcrypt.so.11
inflating: /opt/VSCode-linux-x64/libffmpegsumo.so
inflating: /opt/VSCode-linux-x64/license.txt
inflating: /opt/VSCode-linux-x64/icudtl.dat
creating: /opt/VSCode-linux-x64/resources/
creating: /opt/VSCode-linux-x64/resources/app/
inflating: /opt/VSCode-linux-x64/resources/app/nls.js
.
.
.
inflating: /opt/VSCode-linux-x64/natives_blob.bin
inflating: /opt/VSCode-linux-x64/libchromiumcontent.so
inflating: /opt/VSCode-linux-x64/snapshot_blob.bin
inflating: /opt/VSCode-linux-x64/libnotify.so.4
inflating: /opt/VSCode-linux-x64/ThirdPartyNotices.txt
Run the following command to change the executable permission of the code file.
[root@linuxhelp1 vscode]# chmod +x /opt/VSCode-linux-x64/Code
[root@linuxhelp1 vscode]# /opt/VSCode-linux-x64/Code
[33928:0918/005221:ERROR:browser_main_loop.cc(170)] Running without the SUID sandbox! See https://code.google.com/p/chromium/wiki/LinuxSUIDSandboxDevelopment for more information on developing with the sandbox on.
bash: cannot set terminal process group (-1): Inappropriate ioctl for device
bash: no job control in this shell
Run the following code to create a soft link.
[root@linuxhelp1 vscode]# ln -s /opt/VSCode-linux-x64/Code /usr/local/bin/code
[root@linuxhelp1 vscode]# code .
[34084:0918/005439:ERROR:browser_main_loop.cc(170)] Running without the SUID sandbox! See https://code.google.com/p/chromium/wiki/LinuxSUIDSandboxDevelopment for more information on developing with the sandbox on.
bash: cannot set terminal process group (-1): Inappropriate ioctl for device
bash: no job control in this shell
To create the desktop launcher
Copy the icon file to /usr/share directory in order to create the desktop Launcher.
[root@linuxhelp1 vscode]# cp /opt/VSCode-linux-x64/resources/app/vso.png /usr/share/icons/
Then, create the desktop launcher having the extension .desktop as shown below inside the /tmp/vscode/ directory.
[root@linuxhelp1 vscode]# vim /tmp/vscode/visualstudiocode.desktop
[Desktop Entry]
Name=Visual Studio Code
Comment=Multi-platform code editor for Linux
Exec=/opt/VSCode-linux-x64/Code
Icon=/usr/share/icons/vso.png
Type=Application
StartupNotify=true
Categories=TextEditor Development Utility
MimeType=text/plain
After creating the desktop file, copy it to /usr/share/applications/ directory to make it available in a single click from the browser or menu bar.
[root@linuxhelp1 vscode]# cp /tmp/vscode/visualstudiocode.desktop /usr/share/applications/
Now the Visual Studio Code icon is available in the main menu, click on the icon to work on the application.
Any apps installed during a test run are uninstalled
All local storage is cleared from the device
Devices are restored to their default settings
If you don't wish to send cr