How To Run VS Code On Android In 3 Amazing Simplest Steps

How to run VS Code on Android ? Have you ever wondered, how you can install VS code in android ? If you are interested in programming you may know about Visual Studio Code by Microsoft. VS code is a feature rich code editor, in which you can write your code and it is used by so many programmers and coders.

how to run vs code in android

But sadly, VS code is only available for Linux, Windows and Mac OS. It is not available for android but, we can also run Vs code on android very easily. So if you wish to run VS code on android device stick with me to the end of this article. In this article, I’ll tell you how to run vs code on android ?

Install and Configure VS code

To install VS code in android, first we need to install Termux application in our device. So, download and install Termux from F-droid, DO NOT INSTALL TERMUX FROM PLAYSTORE.

Click Here To Download Termux From F-droid

To know the reason why I'm not encouraging you guys to download Termux from PlayStore, check this article :- Termux 403 Forbidden Error & Repository Down Or Under Maintenance Error

After you’ve successfully downloaded and installed Termux, follow the steps below to install Visual Studio Code in android :

  • Launch Termux application, and type apt update to update the list of packages.
apt update
  • Install proot-distro package by typing apt install proot-distro
apt install proot-distro
  • After installation is completed, list all available distros to install using proot-distro list
proot-distro list
  • You can install any distro you want from the list, by the way we are going to install Ubuntu. So type proot-distro install and then alias name that is ubuntu
proot-distro install ubuntu
  • After it is installed, type proot-distro login ubuntu to launch ubuntu
proot-distro login ubuntu
  • In Ubuntu system that is installed in Termux, copy paste the command below to update the list and install wget package
apt update && apt install wget -y
  • Then, copy paste the following command to download code server.
wget https://github.com/cdr/code-server/releases/download/v3.11.1/code-server-3.11.1-linux-arm64.tar.gz --no-check-certificate
  • Extract the tar file using tar -xvf and file name.
tar -xvf code-server-3.11.1-linux-arm64.tar.gz

Run Visual Studio Code On Android

After the extraction is completed, you’ll see new directory named code-server-3.11.1-linux-arm64. Change the working directory to code-server-3.11.1-linux-arm64 using cd command.

cd code-server-3.11.1-linux-arm64
  • Get inside bin directory that is in code-server-3.11.1-linux-arm64 directory.
cd bin
  • Set password for your VS code using the following command
export PASSWORD="password"
  • Launch the VS code by executing code-server file.
./code-server
how to run vs code on android - login page
VS Code For Android
  • In password section enter password and then submit. Congrats ! now you must be seeing VS code in your browser.
visual studio code on android
VS Code In Android

Conclusion

So this is how you can install and run VS code in your android phone with the help of Termux application. If you are going to use this thing, I would recommend you to get external keyboard and mouse for your phone. Because using this thing without external keyboard and mouse can be pain in the ass. You can also watch my YouTube video that will be uploaded soon on installing visual studio code on android.

guest
11 Comments
Most Voted
Newest Oldest
Inline Feedbacks
View all comments
Lubandi lauben
Lubandi lauben
10 months ago

I get this error why all the time.

Screenshot_20211004-011914.png
trackback
10 months ago

[…] VS Code On Android In 3 Simplest Steps […]

trackback
10 months ago

[…] How To Run VS Code On Android […]

roy
roy
7 months ago

Thanks!!! this is awesome! so far seems great on my tab s7.
I have a few noob questions, if I may:
1) Do I need to shut it down everytime I’m not using it? does it consume battery otherwise?
2) How do I shut it down? what command do I enter in termux?
3) How would I unistall/remove the whole setup if I ever wanted do?
Thanks again!

Progamer
Progamer
1 month ago

It worked at first but when ever I open it now it says “refused to connect” pls help

Yassine yassine
Yassine yassine
10 days ago

Yassine yassine

11
0
Would love your thoughts, please comment.x
()
x