We use cookies to make your experience better.
termux-setup-storage
to allow storage access, or else code-server won't be able to read from /sdcard
.\
The following command is from proot-distro, but you can also use Andronix. After Debian is installed the
~ $
will change to[email protected]
.
pkg update -y && pkg install proot-distro -y && proot-distro install debian && proot-distro login debian
apt update && apt upgrade -y && apt-get install sudo vim git -y
Install NVM by following the install guide in the README, just a curl/wget command.
Set up NVM for multi-user. After installing NVM it automatically adds the necessary commands for it to work, but it will only work if you are logged in as root:
nano /root/.bashrc
and comment out those lines by adding a #
at the start.nano /etc/profile
and paste those lines at the end of the file. Make sure to replace $HOME
with /root
on the first line.exit
proot-distro login debian
After following the instructions and setting up NVM you can now install the required node version by running:
nvm install v<major_version_here>
code-server
run the following:
To check the install process (Will not actually install code-server) If it all looks good, you can install code-server by running the second command
curl -fsSL https://code-server.dev/install.sh | sh -s -- --dry-run
curl -fsSL https://code-server.dev/install.sh | sh
code-server
.Consider using a new user instead of root, read here why using root is not recommended.
Learn how to add a user here.
rm -rf ~/.local/lib/code-server-*
curl -fsSL https://code-server.dev/install.sh | sh
/sdcard
Issue : Using git in the /sdcard
directory will fail during cloning/commit/staging/etc...
Fix : None
Potential Workaround :
/sdcard
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 version
Run 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/version
python3 -V
to verify if PATH works or not.
If
python3
doesn't work but pyenv says that the install was successful in step 6 then try running$PYENV_ROOT/versions/your_version/bin/python3
.
Debian PRoot Distro Dev Environment
~/.ssh/
configuration, ~/.bashrc
, git, npm packages, etc. should be setup in PRoot as well.~/.bashrc
in the Debian PRoot distro.Accessing files in the Debian PRoot Distro
/data/data/com.termux/files/home
directory in PRoot accesses the termux home directory (~
)/sdcard
directory in PRoot accesses the Android storage directory, though there are known issues with git and files in the /sdcard
pathAccessing the Debian PRoot distro/Starting code-server
proot-distro login debian
proot-distro login debian -- code-server
--user <username>
option between login
and debian
in the commands above to run as the user instead of root in PRoot.Additional information on PRoot and Termux
See an opportunity to improve our docs? Make an edit.