Install Visual Studio – How to run VS Code on Android? Have you ever wondered how you can install VS Code on Android? If you are interested in programming, you may be familiar with Microsoft’s Visual Studio Code. VS code is a feature-rich code editor where you can write your code and is used by so many programmers and coders.
Visual Studio Code or vs code is a free source code editor. VS Code software was created by Microsoft for Linux, Windows, and Mac OS. Today in this blog post I will tell you how we can install and use vs code on Android using termux.
Termux is an application that provides a Unix/Linux-like experience on your Android device. But getting a familiar IDE like Visual Studio Code involved a series of steps. Recently, various package managers seem to have simplified this and now it can be done in fewer steps.
The first is that we will install an open source version of Visual Studio Code (VS Code), called code-server.
Visual Studio Code is a product of Microsoft. It is a source code editor created for Windows, Linux, and Mac operating systems.
Visual Studio includes features such as debugging, syntax highlighting, intelligent code completion, snippets, code refactoring, and embedded Git. It is a very good app for developers to create any software, website, or app. The problem is that Microsoft has not developed Visual Studio for Android and many features are not available in the source editing apps that are present in the Playstore.
But I have a solution for that, you can use Termux in Visual Studio Code on Android. You’ll run a few commands and launch and open Visual studio code in Android, so let’s get started.
- Termux App
- Chrome or Any Browser
Install VS Code on Android
To install vs code on Android, we will need the termux app, which can be downloaded from the Google Play Store or F-Droid. After installing termux open your termux and enter the two commands I have given below to update your termux.
Step_1 – Download the Termux app
- First, open the F-Droid.org Website / App on your Android phone.
- Search for the Termux app.
- And install it on your Android phone by clicking the Download button
- And it will download to your phone.
Note: It’s safe because you downloaded it from Google Playstore and every app you get from Playstore is safe.
This will install Termux on your Android mobile. Then set it up by following these steps:
- Also Read: A-Z Complete Termux Commands List
- Also Read: How to Install & Use Maltego In Termux a Complete Guide
- Also Read: How to Install Cloudflare In Termux
- Also Read: How to Get Enable Extra Keys in Termux
- Also Read: How to Install Kali Linux on Android Termux Without Root
Step_2 – Configuration Termux:
After you have successfully downloaded and installed Termux, follow these steps to install Visual Studio Code on Android:
Open Termux. Run the following command in it:
First, set up the repository and update Termux using the commands below:
Now Open the Termux application and enter the apt update & upgrade package list.
Installing the new wget package in termux wget is a Linux command line tool that can be used to download files or entire web pages.
Step_3 – Installing Ubuntu
Then we are going to install Ubuntu on Termux. If you don’t know how we can install Ubuntu on Termux, you can read our previous post How to Install Ubuntu on Termux.
Enter the commands below to download the ubuntu installation script. Run the following command:
pkg install wget openssl-tool proot -y && hash -r && wget https://raw.githubusercontent.com/EXALAB/AnLinux-Resources/master/Scripts/Installer/Ubuntu/ubuntu.sh && bash ubuntu.sh
In the Ubuntu system that is installed in Termux. downloading and executing the ubuntu script, Now it’s time to launch ubuntu.
Type the below command to launch ubuntu in termux.
After typing enter you will be redirected to root@localhost Directory and that is the directory for ubuntu.
First, update and upgrade ubuntu using the below command
Step_4 – Downloading Visual Studio
To download the latest release of Code Server, follow these steps. Now you need to download the VS Code executable file from the below command.
After downloading the tar executable file using
tar -xvf and filename, extract the file using this command.
The file will be extracted in a few minutes, after extracting you can optionally delete the downloaded tar file to free up space or you can leave it there.
After the extraction is complete, you will see a new directory called. Change the working directory to
code-server-5.5.1-linux-arm64 using the cd command. The files are not executable, so they should be placed in the /bin folder for easy access to invoke the file whenever needed.
To do this, enter the command below.
Step_5 – Setup & Start Visual Studio Code:
You can install any code editing software like a flutter, dart, etc. in Visual Studio Code. When you create a new instance or reopen Visual Studio Code, you have to enter a new password again and again, which is very annoying. To fix this issue, copy and paste the command below into ubuntu termux.
Enter the following command to set a VS Code password (you can replace the password with your own password):
After this step, it will directly open the visual code without requiring a password.
Run VS Code by running the code-server file. Now it’s time to open the editor app on Android using the below command.
After entering the above command, you will get the server address as http://localhost:8080 and a random password. Copy the server address and paste it into your browser. It asks to enter a password, to insert the given password from termux into the browser. And visual code on android, you can get all pc apps on android using this method.
Now open any browser on your phone and visit http://localhost:8080 and use the VS code on your phone.
In the password section, enter your password and then submit. Congratulations! now you should see VS code in your browser.
This is how you can install and run VS Code on your Android phone using Termux. If you’re going to use this thing, I’d recommend getting an external keyboard and mouse for your phone. Because using this thing without an external keyboard and mouse can be a pain. You can also watch my YouTube video which will be uploaded soon on installing visual studio code on Android.
FAQ – VS Code For Android:
Is VS Code available for android?
No, it’s not officially available as an app on the play store. But there are various other ways of using it. One is to use it on your local host server. We have explained all its processes in this article.
Can I use VS Code on mobile?
Yes, you can use VS Code on mobile. But, it’s not officially available as an app on the play store. Rather you have to use it on your localhost server. We have explained all its processes in this article.
To install VS Code in android, you will need to install termux, then install Ubuntu using it, install the code server and use it as a code editor based on VS Code’s layout and functioning.
Can we code on the phone?
Indeed, you can involve VS Code in your mobile phone. In any case, it’s not accessible as an application on the play store. Maybe you need to utilize it on your local host server. We have provided all of its steps in this article.
To use VS Code in android, you should install termux, then, at that point, install Ubuntu utilizing it, install the code server and use it as a code supervisor in view of VS Code’s design and working.