docs/termux.md
pkg install tur-repopkg install code-servercode-server.Get Termux from F-Droid.
We will now change using the following command.
termux-change-repo
Now select Main Repository then change repo to Mirrors by Grimler Hosted on grimler.se.
pkg update
pkg upgrade -y
pkg install -y \
build-essential \
binutils \
pkg-config \
python3 \
nodejs-lts
npm config set python python3
node -v
you will get Node version v22
Now install code-server following our guide on installing with npm
Congratulation code-server is installed on your device using the following command.
code-server --auth none
npm update --global code-server
rm -rf ~/.local/lib/code-server-*curl -fsSL https://code-server.dev/install.sh | sh/sdcardIssue : Using git in the /sdcard directory will fail during cloning/commit/staging/etc...
Fix : None
Potential Workaround :
/sdcardIssue: Android is not seen as a Linux environment but as a separate, unsupported platform, so code-server only allows Web Extensions, refusing to download extensions that run on the server.
Fix: None
Potential workarounds :
Either
Manually download extensions as .vsix file and install them via Extensions: Install from VSIX... in the Command Palette.
Use an override to pretend the platform is Linux:
Create a JS script that patches process.platform:
// android-as-linux.js
Object.defineProperty(process, "platform", {
get() {
return "linux"
},
})
Then use Node's --require option to make sure it is loaded before code-server starts:
NODE_OPTIONS="--require /path/to/android-as-linux.js" code-server
⚠️ Note that Android and Linux are not 100% compatible, so use these workarounds at your own risk. Extensions that have native dependencies other than Node or that directly interact with the OS might cause issues.
In order to support the tab key and use keyboard shortcuts, add this to your settings.json:
{
"keyboard.dispatch": "keyCode"
}
To create a new user follow these simple steps -
useradd <username> -m.passwd <username>.visudo, scroll down to User privilege specification and add the following line after root username ALL=(ALL:ALL) ALL./etc/passwd file with your command line editor of choice and at the end of the line that specifies your user change /bin/sh to /bin/bash.su - <username>- betweeen su and username is required to execute /etc/profile,/etc/profile may have some necessary things to be executed you should always add a -.linux arm and run the following:wget download_link
rm -rf /usr/local/go && tar -C /usr/local -xzf archive_name
nano /etc/profile and add the following line export PATH=$PATH:/usr/local/go/bin.exit (depending on if you have switched users or not, you may have to run exit multiple times to get to normal termux shell) and start Debian again.go versionRun these commands as root
sudo apt-get update
sudo apt-get install make build-essential libssl-dev zlib1g-dev \
libbz2-dev libreadline-dev libsqlite3-dev wget curl llvm \
libncursesw5-dev xz-utils tk-dev libxml2-dev libxmlsec1-dev libffi-dev liblzma-dev
curl -L https://github.com/pyenv/pyenv-installer/raw/master/bin/pyenv-installer | bash
nano /etc/profile and add the following:export PYENV_ROOT="/root/.pyenv"
export PATH="/root/.pyenv/bin:$PATH"
eval "$(pyenv init --path)"
eval "$(pyenv virtualenv-init -)"
pyenv versions to list all installable versions.pyenv install version to install the desired python version.
The build process may take some time (an hour or 2 depending on your device).
touch /root/.pyenv/version && echo "your_version_here" > /root/.pyenv/versionpython3 -V to verify if PATH works or not.
If
python3doesn't work but pyenv says that the install was successful in step 6 then try running$PYENV_ROOT/versions/your_version/bin/python3.