Install from AUR (Method # 1)
1- Acquire build files from Arch Linux user repository.
$ curl -L -O https://aur.archlinux.org/cgit/aur.git/snapshot/visual-studio-code-bin.tar.gz
2- Extract the downloaded package
$ tar -xvf visual-studio-code-bin.tar.gz
3- Change directory to the extracted package
$ cd visual-studio-code-bin
4- Build and install the package
$ makepkg -si
Install using Yaourt (Method # 2)
It will be a two-step process. First, we will install Yaourt, then use it to install VS Code.
Installing Yaourt
Edit Pacman configuration file to include the repository for Yaourt
$ sudo nano /etc/pacman.conf
Add the following lines at the end of the file and save it
[archlinuxfr] SigLevel = Never Server = http://repo.archlinux.fr/$arch
Now refresh the repository database and install Yaourt
$ sudo pacman -Sy yaourt
Installing VS Code
Yaourt makes installing VS Code pretty easy, we just have to execute the following command.
$ sudo yaourt visual-studio-code-bin
Increasing NOFILE limit
During installation, you might get an error due to the limit on the number of files opened by a process.
To check the limit, use the following command:
$ ulimit -n
To increase the limit, add the following lines to /etc/security/limits.conf file.
<username> soft nofile 10000 <username> hard nofile 10000
Don’t forget to replace <username> with the logged in user’s name and also restart the machine for the change to take effort.
Links
https://code.visualstudio.com/docs/setup/linux
https://aur.archlinux.org/packages/visual-studio-code-bin
Thank you for the info. I tried to install as per the above instructions, but the o/p says edit pkgbuild and then it is not installing. Please Help
Hi Sankar,
You have to say ‘no’ to edit pkgbuild. Also try without ‘sudo’.
If you are still getting the error, please share the error message with me here…. I will try to help.
I also faced an issue with installing the latest version of vscode using Yaourt. As Yaourt is not actively developed, I have included in the post another way of installing vscode directly from AUR (Method # 1).
Please use method # 1 if Yaourt is not working.
why we dont download from Pacman
how to update it?
This is a bit outdated. I would recommend using Flatpak to install VSCode. This guide is more up to date, even on the AUR part. Yaourt has been dead. https://credibledev.com/install-vs-code-on-manjaro-linux/