Today I will show you how to use vs code on mobile phone if you don’t have a pc or laptop and you want to code you can use vs code on your mobile.
You don’t have to root your phone or anything it is a safe and easy way which I am going to tell so read the article carefully so that you don’t miss anything I will show you step by step how to install vs code on mobile phone.
It will not work for ios devices so if you don’t have a android phone than you can leave this article now. You will be only able to install vs code on android phone because the app which we are going to use is available only for android.
If you want to know more about vs code and want to know the best editor for coding than read this article – Best code editor for coders.
How To Use VS Code On Mobile
This is going to be a step by step guide on how to use vs code on mobile and don’t skip any command which I am going to tell follow all the steps for a successfully installation of vs code on mobile.
If you want more guides like this than do visit our blog page we have amazing coding articles and guides – Visit coderzway blog.
1. Install Termux
Termux is a android app which is a android terminal emulator and linux environment it provides a terminal on your phone which you can use to execute commands. It is does not require rooting or any setup.
It is a small application which you can download from playstore it is free – Download Termux. It is safe and secure application you can customise it and you can use the command which you use in linux.
You can install python, node js or any other package you want but today we will be using it just for installing vs code on your mobile so let’s go to the next step.
2. Install Ubuntu using termux
After download and installing termux open the application and we need to install ubuntu using termux don’t worry you don’t need to download a big file and it won’t effect your device system.
After opening the application to install ubuntu you need to use the below command which will install ubuntu it will start downloading file around 50 mb so you need to wait until it gets download.
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
Now after it gets installing use the below command to start the ubuntu system
3. Download code server
Now after ubuntu starts you need to download another package which is the code server you can download it by using the below command it is around 60 mb wait for it to download.
Now after downloading you need to extract the file so to extract the file type or paste the below command it will extract the code server file.
tar -xvf ./code-server-3.10.2-linux-arm64.tar.gz
After extraction you have to change your directory to code-server-3.10.2-linux-arm64 you just need to use below command it is just the same command you use in linux to change directory.
After you changed your directory to code-server-3.10.2-linux-arm64 now you have to go to the bin folder from the present directory paste the below command.
4. Start vs code
We are almost finished Now the last step is to start vs code before that you need to setup a password which will be asked later so you should in the bin folder from there execute the below command.
export PASSWORD="enter a password"
In the password field enter the password you want you need to remember the password. Now from the same directory use the below command to run the code server
Now you must see something like below
bash: /root/.config/code-server/config.yaml: Permission denied root@localhost:~/code-server-3.10.2-linux-arm64/bin# export PASSWORD="password" root@localhost:~/code-server-3.10.2-linux-arm64/bin# ./code-server [2021-07-05T04:25:31.962Z] info code-server 3.10.2 387b12ef4ca404ffd39d84834e1f0776e9e3c005 [2021-07-05T04:25:31.966Z] info Using user-data-dir ~/.local/share/code-server [2021-07-05T04:25:32.007Z] info Using config file ~/.config/code-server/config.yaml [2021-07-05T04:25:32.008Z] info HTTP server listening on http://127.0.0.1:8080 [2021-07-05T04:25:32.008Z] info - Authentication is enabled [2021-07-05T04:25:32.008Z] info - Using password from $PASSWORD [2021-07-05T04:25:32.008Z] info - Not serving HTTPS
You must be wondering it did not start vs code well it did now inorder to access vs code you need to go to your browser at localhost:8080 it started the code server at this port now enter the password you entered earlier and hit submit.
Hurray you should see that vs code opened successfully you can see that it is just like the vs code on your pc or laptop you can install extensions create files and folders and program on it.
It is little difficult to type on it you can use a external keyboard and a mouse it also have autocomplete emmet feature so now you can code on your mobile.
After you have closed termux if you want to restart vs code just start the ubuntu system you don’t need to download anything again go to the directory and start the code server.
This was it How to use vs code on mobile I explained all the steps so follow them properely if you got any errors than comment below or contact me now you can use the popular vs code on your mobile.
I hope you found this article helpful and installed vs code on your android mobile successfully If you liked it share it with your friends and family do subscribe to our newsletter for more coding guides like this.
If you are using vs code and want to know the best vs code extensions than read this guide – best vs code extensions for programmers I have talked about the best vs code extensions there.
Thank you for reading Have a nice day 🙂