[Solved] VSCode error => grep: /proc/version: Permission denied

Alright If you reached this page it means you have a linux on your phone, It’s not important with which way you installed it, with termux , andronix, anlinux, linux-deploy , Method is same, You installed VSCode and when you try to run it from terminal you see the grep: /proc/version: Permission denied , It’s ok let’s fix it.

OK first thing first you may need to update and upgrade your linux and apps, so run command below on terminal

sudo apt-get update -y , sudo apt-get upgrade -y

Now in case if you don’t have VSCode installed, you can install it in 2 ways :

with this command => sudo apt-get install code

Or you can download the suitable version from Official Website then you can install it with any app manager or with apt/dpkg.

Now that we have the VSCode installed, we have to do some workarounds to run it without any errors.


Step 1 :

Create a file in /Home/[username] and name it .version (in my case username is kali so the file path will be /home/kali/.version)


Step 2 :

Copy and paste this text in a single line and save the file =>

Linux version 5.4.0-fake-kernel (termux@fakehost) (gcc version 4.9.x 20150123 (prerelease) (GCC) ) #1 SMP PREEMPT Fri Jul 10 00:00:00 UTC 2020


Step 3 :

Now open a terminal and type whereis code , you may see a result like this : code: /usr/bin/code /usr/share/code

now edit the first file with any text editor (I will use nano), so run this command sudo nano /usr/bin/code now we have to change a line that contains the address of /proc/version , we have to replace it with address of the file we created in step 1 and 2 and save it. the file will look like this :

Step 4 :

Now we are actually done, if you want to run VScode from terminal , use one of these commands:

/usr/share/code/code –unity-launch %F –no-sandbox   or   code –unity-launch %F –no-sandbox

or simply find VSCode in Applications list and edit it by adding –no-sandbox at the end of the command just like image below



WE ARE DONE, Enjoy Coding  😉


You may also like...

Leave a Reply