How to install Visual Studio Code on Linux? - linux

I have just downloaded VSCode-linux-x64 from the Microsoft website. It's a zip file called VSCode-linux-x64.zip. How can I install it on my Linux system?

From a few pages deeper into the setup docs in the link you offered...
Linux
Download Visual Studio Code for Linux
Make a new folder and extract VSCode-linux-x64.zip inside that folder
Double click on Code to run Visual Studio Code
Tip: If you want to run VSCode from the terminal, create the following
link substituting /path/to/vscode/Code with the absolute path to the
Code executable
sudo ln -s /path/to/vscode/Code /usr/local/bin/code in any folder to start editing files in that
folder.
Now, you can simply type code . in any folder to start editing files
in that folder.

I found the answer to my question and posting the answer so it can help others.
To download and install Visual Studio Code on Ubuntu . follow the steps below
Download Visual Studio Code for Linux
Extract the zip file VSCode-linux-x64.zip
Go inside the folder VSCode-linux-x64
double click and Run code executable to open Visual Studio Code .
You can right click on Visual Studio Code on toolbar (or launcher)
and select Lock to Launcher. this way you can launch the editor by
clicking it on launcher.
If you are using terminal follow the terminal commands
mkdir your_folder_name && cd your_folder_name unzip
../Downloads/VSCode-linux-x64.zip
./Code
This video will help you to download and install and use Visual Studio Code on Ubuntu if you still have some doubts

After 18.04 version, the following one-line terminal code works well.
sudo snap install code --classic

Installing with apt-get:
Step 1 – Enable Package Repository
Run the following command to enable Visual studio code repository to your system:
echo "deb [arch=amd64] http://packages.microsoft.com/repos/vscode stable main" | sudo \ tee /etc/apt/sources.list.d/vs-code.list
Step 2 – Install Visual Studio Code Editor
Now, Import the package signing gpg key on your system using the following command:
curl https://packages.microsoft.com/keys/microsoft.asc | gpg --dearmor > microsoft.gpg
sudo mv microsoft.gpg /etc/apt/trusted.gpg.d/microsoft.gpg
Install Visual Studio Code on your Debian based system (like Ubuntu):
sudo apt-get update
sudo apt-get install code
Step 3 – Launch Visual Studio Code and enable its extensions:
Now You can launch the Visual Studio Code editor on your system using the graphical menu.
There are a large number of extensions available for Visual Studio Code like PHP, Python, JavaScript etc. Install the required extensions to enhance your working experience with Visual Studio Code.
Source: https://tecadmin.net/install-visual-studio-code-editor-ubuntu/

Simplest way to install Visual Studio Code in Linux
I hope it useful.
Installing Visual Studio Code in Kali Linux - 4 simple steps
Update your system and install the below package.
sudo apt update
sudo apt install curl gpg software-properties-common apt-transport-https
Importing Microsoft GPG key to Kali Linux
curl -sSL https://packages.microsoft.com/keys/microsoft.asc | sudo apt-key add -
Adding APT repository for VS Code to Kali Linux
echo "deb [arch=amd64] https://packages.microsoft.com/repos/vscode stable main" | sudo tee /etc/apt/sources.list.d/vscode.list
Installing VS Code
sudo apt update
sudo apt install code
For reference:
https://youtu.be/ycIjQf0rOJI

Related

How to install flutter on Linux Mint

I'm new to linux mint and I don't know how to install flutter.
"https://docs.flutter.dev/get-started/install/linux"
I couldn't understand the things in the link here, I would appreciate it if you could help.
Let me explain in simple steps :
first install "snapd" in your linux machine using command
Steps to install snapd-
sudo mv /etc/apt/preferences.d/nosnap.pref ~/Documents/nosnap.backup
sudo apt update
sudo apt install snapd
Now,Install flutter using snap-
1- sudo snap install flutter --classic
flutter will get installed after this (stablle internet connection needed)
To verify your flutter, run following command
flutter doctor
Note: You will need to install Android studio to run flutter on android emulator.
Hope it will work!!
#Install Flutter manually
Download the following installation bundle to get the latest stable release of the Flutter SDK From :
enter link description here
Extract the File > Move to the desire location .
then , Just Update The Path Parmanently .Shown in the Snaps Bellow :

Is there a way to update visual-studio-code-bin which is installed from the arch wiki

visual-studio-code-bin is installed from the arch wiki. The only way I know how to actually update the software is reinstalling it again from the arch wiki which is tedious and inconvenient.
Any help is appreciated
Old post with a lot of split information so for anyone who finds this later, you have 2 choices:
Install the open source version of visual studio code from the official repos.
Install the official Microsoft binary version via the AUR that contains some proprietary code from Microsoft that is not available in the fully open version (e.g. some debugging some languages).
Info on how to do this can be found in the wiki.
It depends on how you installed vscode. If you did sudo pacman -S code, then the solution is to run it again. But if you did yay -S visual-studio-code-bin, then you should run THIS command again.
The best way to use VS Code on Arch is to use the open source version on the community repos. Which you can install by doing
sudo pacman -S code
visual-studio-code-bin is the proprietary binary which can be installed from the Arch User Repository.
If for some reason you want to go for the latter approach, you can either use an AUR helper or manage everything manually.
You can see the Arch Wiki's page on AUR helpers which shows the different options you have: https://wiki.archlinux.org/index.php/AUR_helpers
You can use these helpers to help manage your updates just like you would on pacman.
Here's how you would do things manually: https://wiki.archlinux.org/index.php/Arch_User_Repository#Installing_and_upgrading_packages
Just as a warning, AUR helpers are not supported by Arch Linux and the manual approach, though less user friendly is the recommended way by the Arch Wiki to manage your AUR Packages.
First a short version:
Simply run
sudo pacman -Sy
sudo pacman -S visual-studio-code-bin
The longer explanation:
Getting the right version of vscode
First of all, "code" and "visual-studio-code-bin" are two different packages. "code" is an open-source release and "visual-studio-code-bin" is an Microsoft-branded release. One of the major differences is that "code" doesn't support any Microsoft Extensions like C/C++, to my knowledge. This information can be found in the arch wiki: https://wiki.archlinux.org/title/Visual_Studio_Code#Installation. For more detailed information about the differences I'll refer you to the vscode repository: https://github.com/microsoft/vscode/wiki/Differences-between-the-repository-and-Visual-Studio-Code
By running "sudo pacman -S code" you (unintentionally) uninstall "visual-studio-code-bin" and install "code" because of wired some decency conflict.
So if you want to update/install "visual-studio-code-bin" run:
sudo pacman -S visual-studio-code-bin
This should fix any Problems with no functioning Microsoft-Extensions
Of course if you want to sick to the open-source version you can use
sudo pacman -S code
Fixing your Problem with not updating to the right version
I have to admit this took me ages. I had two machines, one with an freshly installed version of geruda Linux (an arch based distro) and an six moth old version of geruda Linux. Both had vscode installed. At the time of writing this the current version of vscode is 1.59.0-1. Interestingly the my old machine, witch had vscode version 1.58.0-1 installed didn't know that there was an newer version. The newer machine was aware of the the newer version. An simply running pacman -S visual-studio-code-bin didn't change anything. This hinted my to the problem of an not synchronized package database. And forcefully synchronizing the database with
sudo pacman -Sy
did the trick for me. For a more detialed information I would redirect you to the man pages: https://archlinux.org/pacman/pacman.8.html or this thread https://bbs.archlinux.org/viewtopic.php?id=117765. After running this command you only need to install vscode with "sudo pacman -S visual-studio-code-bin" or "sudo pacman -S code" to get the newest version of vscode
As rightly said by #AlexanderHD27 code is open source and vscode is microsoft official version but it is not open source. though code is more like an experimental version of of vscode; however, you can install code directly in archlinux using sudo pacman -S code but for the the vscode you have to clone the repository from github and install in the following way:
git clone visual-studio-code-bin
then cd visual-studio-code-bin and makepkg -si
remember if you don't have git installed you can do that using sudo pacman -S git. As for the update; code is updated during system full update but vscode is not updated. So, you have to cd into the directory again and do git pull the makepkg -si again.
As KamilCuk and Aviad mentioned there is no visual-studio-bin package, since it is a aur package you can use yay (AUR helper) to get a updateable version. For more information about yay see: https://github.com/Jguer/yay.
Install yay
sudo pacman -S --needed base-devel git
git clone https://aur.archlinux.org/yay.git
cd yay
makepkg -si
cd ..
rm -rf yay
Install visual-studio-code-bin with yay
# install
yay -S visual-studio-code-bin
If you installed vscode via pamac manager in manjaro, try this:
pamac update
To update with the cloned AUR directory.
First update pacman database:
pacman-Sy
Then in the AUR directory you can update the AUR to the latest version with:
git pull
Then update dependencies with:
makepkg -s
Finally you install it:
makepkg -i
==> WARNING: A package has already been built, installing existing package...
==> Installing package visual-studio-code-bin with pacman -U...
loading packages...
resolving dependencies...
looking for conflicting packages...
Packages (1) visual-studio-code-bin-1.73.1-1
Total Installed Size: 324.26 MiB
Net Upgrade Size: 29.66 MiB
:: Proceed with installation? [Y/n]

Setup environment using script in Visual Studio Code

I use remote development in Visual Studio Code for a C++/CMake project. However I need to setup a proper build environment before running cmake.
I know I can setup the environment manually by adding each variable to settings.json, but this is not really viable for me since there are a lot of variables that change frequently.
Is there a way I can have Visual Studio Code source a script before running CMake or automate this in any other way?
curl https://packages.microsoft.com/keys/microsoft.asc | gpg --dearmor > microsoft.gpg
sudo install -o root -g root -m 644 microsoft.gpg /etc/apt/trusted.gpg.d/
sudo sh -c 'echo "deb [arch=amd64] https://packages.microsoft.com/repos/vscode stable main" > /etc/apt/sources.list.d/vscode.list'

How do I run GNU Typist/gtypist on a Mac?

I'm a little familiar with command line but I'm still having problems running GNU Typist/gtypist. http://www.gnu.org/software/gtypist/
Can anyone give me really basic step-by-step instructions for a Mac?
Install using Homebrew
brew install gnu-typist
gtypist
You can also install it directly from the sources (note that for building from the sources you have to install XCode - it's free and you can download it from App Store):
Get the source of gnu typist
http://ftp.gnu.org/gnu/gtypist/gtypist-2.9.tar.gz
Get the source of ncurses
I am downloading it from GNU pages here:
ftp://ftp.gnu.org/gnu/ncurses//ncurses-6.0.tar.gz.sig
But you can get most recent version directly from maintainer's page:
ftp://ftp.invisible-island.net/ncurses/ncurses.tar.gz
Create place where you want to have all the stuff
mkdir ~/opt/usr
Build ncurses - pay attention to --enable-widec
./configure --enable-widec --with-shared --prefix=$HOME/opt/usr/
make; make install
Build gnutypist
export LDFLAGS="-L$HOME/opt/usr/lib"
export CFLAGS="-I$HOME/opt/usr/include"
./configure --prefix=$HOME/opt/usr/
make; make install
Run gnutypist
cd $HOME/opt/usr/bin
./gtypist
Alternatively to brew you can use MacPorts (macos package manager)
Installation command:
sudo port install gtypist
Link to the port summary page:
https://ports.macports.org/port/gtypist/summary

how to install adobe air sdk in linux?

i'm trying to install the adobe air sdk in linux. i unzip the package downloaded from http://www.adobe.com/products/air/tools/sdk/ into a folder "AdobeAIRSDK", and add the /bin folder into the PATH environment variable. but when i tried to run the adl, it gives me the following error:
Error loading the runtime (/home/monuser/AdobeAIRSDK/bin/../runtimes/air/linux/Adobe AIR/Versions/1.0/Resources/nss3/None/libnss3.so: file too short)
what's the problem here and how do i get it fixed?
Are you trying to install on a 64-bit OS? Either way, Adobe has a KB on installation that might help.
Installing Adobe Air on Ubuntu 13.10
Install i386 libraries, that are required for successful installation and running of Adobe Air and air applications:
sudo apt-get install libgtk2.0-0:i386 libstdc++6:i386 libnss3-1d:i386 lib32nss-mdns libxml2:i386 libxslt1.1:i386 libcanberra-gtk-module:i386 gtk2-engines-murrine:i386
Install gnome-keyring:i386.
It can't be installed using apt-get as other i386 (at least at the moment of writing this), because of it's dependencies. So we'll need to download it and install manually. In fact, this is easy:
download deb-package using apt-get to /tmp:
cd /tmp
sudo apt-get download libgnome-keyring0:i386
extract deb-package into gnome-keyring subfolder (note version in the file name, it may be different):
sudo dpkg-deb -R libgnome-keyring0_3.8.0-2_i386.deb gnome-keyring
install library in the system by copying:
sudo cp gnome-keyring/usr/lib/i386-linux-gnu/libgnome-keyring.so.0.2.0 /usr/lib/i386-linux-gnu/
create symlinks so Adobe Air could see it:
sudo ln -s /usr/lib/i386-linux-gnu/libgnome-keyring.so.0.2.0 /usr/lib/i386-linux-gnu/libgnome-keyring.so.0
sudo ln -s /usr/lib/i386-linux-gnu/libgnome-keyring.so.0 /usr/lib/libgnome-keyring.so.0
sudo ln -s /usr/lib/i386-linux-gnu/libgnome-keyring.so.0.2.0 /usr/lib/libgnome-keyring.so.0.2.0
Download Adobe Air installer from Adobe official site: http://helpx.adobe.com/air/kb/archived-air-sdk-version.html
Install Adobe Air using downloaded installer (don't forget to allow execution of the installer file):
chmod a+x AdobeAIRInstaller.bin
sudo ./AdobeAIRInstaller.bin
Adobe Air should be installed successfully now! Now you may remove excess symlinks:
sudo rm /usr/lib/libgnome-keyring.so.0
sudo rm /usr/lib/libgnome-keyring.so.0.2.0
Source

Resources