How to install Vscode on android

josiasaurel

Josias Aurel

Posted on May 19, 2020

How to install Vscode on android

Hello there. Today (about an hour ago) I tried something cool. As the title says it. I will show you how to install visual studio code (code Oss) on android. Yes, you got it right.

I will assume you know how to use a terminal. In this tutorial, we will use the most popular android terminal called termux. You can get it here.

Code Oss

I will not waste your time. It's a fork of visual studio code intended for arm based computers like Chromebooks. You can check on their official site

How to install

Here i assume you've installed termux

Steps :

Install Ubuntu in your Android device. It's targeted for such systems. Copy paste the following and wait for it to finish installing

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
Enter fullscreen mode Exit fullscreen mode

Once done, run this command:

./start-ubuntu.sh
Enter fullscreen mode Exit fullscreen mode

When you are in the Ubuntu terminal, you can run the following to grab the editor.

wget https://github.com/cdr/code-server/releases/download/2.1698/code-server2.1698-vsc1.41.1-linux-arm64.tar.gz
Enter fullscreen mode Exit fullscreen mode

Extract it with the following.

tar -xvf ./code-server2.1698-vsc1.41.1-linux-arm64.tar.gz
Enter fullscreen mode Exit fullscreen mode

Voila, you have the editor extracted . Now you can optionally delete the archive to free up some space else your are going to use it later.

The files are no more in an executable format, they need to be placed in a /bin folder for you to have the ability to call it

Due to that, the following command should do the work :

cp ./code-server2.1698-vsc1.41.1-linux-arm64/code-server /bin
Enter fullscreen mode Exit fullscreen mode

Voilà. You can now call the editor by running "code-server" any where in your terminal and you will be able to use it. It is served on localhost:8080.

Final note: Each time you launch it, you'll see a new password and it can be annoying. So let's set a password in our environment variables.
Run this :

export PASSWORD="<your_password>"
Enter fullscreen mode Exit fullscreen mode

Replace with any password of your choice and each time you launch the editor. You'll use the exact same password.

Here is my original tweet :
Liquid error: internal

Like and share

Most credits : Ada Rose article : Coding on Samsung DeX

Buy Me A Coffee

💖 💪 🙅 🚩
josiasaurel
Josias Aurel

Posted on May 19, 2020

Join Our Newsletter. No Spam, Only the good stuff.

Sign up to receive the latest update from our blog.

Related