Skip to content

Commit ba0a6c9

Browse files
committed
yarn-fmt and minor typos
#4472 (comment)
1 parent 4d9fb66 commit ba0a6c9

File tree

1 file changed

+54
-31
lines changed

1 file changed

+54
-31
lines changed

docs/termux.md

Lines changed: 54 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -5,60 +5,71 @@
55
- [Install](#install)
66
- [Upgrade](#upgrade)
77
- [Known Issues](#known-issues)
8-
- [Search doesn't work](#search-doesnt-work)
9-
- [Backspace doesn't work](#backspace-doesnt-work)
8+
- [Git won't work in `/sdcard`](#git-wont-work-in-sdcard)
9+
- [Extra](#extra)
10+
- [Install GO](#install-go)
11+
- [Install Python](#install-python)
1012

1113
<!-- END doctoc generated TOC please keep comment here to allow auto update -->
1214

1315
### Install
1416

1517
1. Get [Termux](https://f-droid.org/en/packages/com.termux/) from **F-Droid**.
16-
2. Install Debian by running the following.
17-
- Also run `termux-setup-storage` to allow storage access or else code-server won't be able to read from `/sdcard/`.\
18+
2. Install Debian by running the following. - Run `termux-setup-storage` to allow storage access, or else code-server won't be able to read from `/sdcard`.\
1819
If you used the Andronix command \\/ then you may have to edit the `start-debian.sh` script to mount `/sdcard` just as simple as uncommenting the `command+=" -b /sdcard"` line.
19-
> The following command was extracted from [Andronix](https://andronix.app/) you can also use [proot-distro](https://github.com/termux/proot-distro).
20+
> The following command was extracted from [Andronix](https://andronix.app/) you can also use [proot-distro](https://github.com/termux/proot-distro).
21+
2022
```bash
2123
pkg update -y && pkg install wget curl proot tar -y && wget https://raw.githubusercontent.com/AndronixApp/AndronixOrigin/master/Installer/Debian/debian.sh -O debian.sh && chmod +x debian.sh && bash debian.sh
2224
```
23-
> After Debian is installed the `~ $` will change to `root@localhost`.
24-
3. Run the following commands to setup Debian.
25+
26+
> After Debian is installed the `~ $` will change to `root@localhost`. 3. Run the following commands to setup Debian.
27+
2528
```bash
2629
apt update
2730
apt upgrade -y
2831
apt-get install nano vim sudo curl wget git -y
2932
```
33+
3034
4. Then create a new user to use later and change its password.
35+
3136
```bash
3237
useradd username -m
3338
passwd username
3439
```
40+
3541
5. Install [NVM](https://github.com/nvm-sh/nvm) by following the install guide in the README, just a curl/wget command.
36-
6. 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 which we do not want (see step 9) so do the following things.
37-
- Copy the lines NVM asks you to run after running the install script.
38-
- Run `nano /root/.bashrc` and comment out those lines by adding a `#` at the start.
39-
- Run `nano /etc/profile` and paste those lines at the end and make sure to replace `$HOME` with `/root`
40-
- Now run `exit` and start Debain again.
42+
6. 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; which we do not want (see step 9) so do the following things.
43+
44+
- Copy the lines NVM asks you to run after running the install script.
45+
- Run `nano /root/.bashrc` and comment out those lines by adding a `#` at the start.
46+
- Run `nano /etc/profile` and paste those lines at the end and make sure to replace `$HOME` with `/root`
47+
- Now run `exit` and start Debain again.
4148

4249
7. After following the instructions and setting up NVM you can now install the [required node version](https://coder.com/docs/code-server/latest/npm#nodejs-version) using `nvm install version_here`.
4350
8. You don't need to install yarn.
44-
9. Now you are ready to install code server but first lets switch users.
45-
- There are many answers on Stack Exchange for why logging in as root is not recommended,\
46-
but heres a [short article](https://www.howtogeek.com/124950/htg-explains-why-you-shouldnt-log-into-your-linux-system-as-root/) for you.
47-
- Run the following `visudo` to give your user (created in step 4) sudo privileges.
48-
- After executing the command scroll to `User privilege specification` and add `username ALL=(ALL:ALL) ALL`.
49-
10. To switch users run `su - username`. **DO NOT forget to add the `-` between `su` and the username or else the `/etc/profile` file won't be executed,** you may instead follow step 6 but edit the `/etc/bash.bashrc` file intead of `/etc/profile` if you don't want to add a `-` between `su` and username.
51+
9. Now you are ready to install code-server, but let's switch users first.
52+
- There are many answers on Stack Exchange for why logging in as root is not recommended,\
53+
but here's a [short article](https://www.howtogeek.com/124950/htg-explains-why-you-shouldnt-log-into-your-linux-system-as-root/) for you.
54+
- Run the following `visudo` to give your user (created in step 4) sudo privileges.
55+
- After executing the command, scroll to `User privilege specification` and add `username ALL=(ALL:ALL) ALL`.
56+
10. To switch users, run `su - username`. **DO NOT forget to add the `-` between `su` and the username or, else the `/etc/profile` file won't be executed,** you may instead follow step 6 but edit the `/etc/bash.bashrc` file instead of `/etc/profile` if you don't want to add a `-` between `su` and username.
5057

5158
11. To install `code-server` run the following.
5259

5360
To check the install process (Will not actually install code-server)
61+
5462
```bash
5563
curl -fsSL https://code-server.dev/install.sh | sh -s -- --dry-run
5664
```
57-
Now if all looks good you can run to install code-server.
65+
66+
If all looks good, you can run to install code-server.
67+
5868
```bash
5969
curl -fsSL https://code-server.dev/install.sh | sh
6070
```
61-
12. Now everytime you run `./start-debian.sh` (or `proot-distro login debian` if you used proot-distro) you can switch to your user `su - username` and run code-server.
71+
72+
12. Every time you run `./start-debian.sh` (or `proot-distro login debian` if you used proot-distro), you can switch to your user `su - username` and run code-server.
6273

6374
### Upgrade
6475

@@ -71,7 +82,8 @@ curl -fsSL https://code-server.dev/install.sh | sh
7182

7283
Issue : Using git in the `/sdcard` directory will fail during cloning/commit/staging/etc...\
7384
Fix : None\
74-
Potential Workaround :
85+
Potential Workaround :
86+
7587
1. Create a soft-link from the debian-fs to your folder in `/sdcard`
7688
2. Use git from termux (preferred)
7789

@@ -81,44 +93,55 @@ Potential Workaround :
8193

8294
> From https://golang.org/doc/install
8395
84-
1. Go to https://golang.org/dl/ and copy the downloadlink for `linux arm` and run the following.
96+
1. Go to https://golang.org/dl/ and copy the download link for `linux arm` and run the following.
97+
8598
```bash
8699
wget download_link
87100
```
88-
2. Extract the downloaded archive. (This step will erase all previous GO installs make sure to create a backup if you have previously installed GO)
101+
102+
2. Extract the downloaded archive. (This step will erase all previous GO installs, make sure to create a backup if you have previously installed GO)
103+
89104
```bash
90105
rm -rf /usr/local/go && tar -C /usr/local -xzf archive_name
91106
```
107+
92108
3. Run `nano /etc/profile` and add the following line `export PATH=$PATH:/usr/local/go/bin`.
93-
4. Now run `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.
109+
4. Now run `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.
94110
5. Check if your install was successful by running `go version`
95111

96112
#### Install Python
97113

98114
> Run these commands as root
99115
100116
1. Run the following command to install required packages to build python.
117+
101118
```bash
102-
sudo apt-get update; sudo apt-get install make build-essential libssl-dev zlib1g-dev \
103-
libbz2-dev libreadline-dev libsqlite3-dev wget curl llvm \
104-
libncursesw5-dev xz-utils tk-dev libxml2-dev libxmlsec1-dev libffi-dev liblzma-dev
119+
sudo apt-get update
120+
sudo apt-get install make build-essential libssl-dev zlib1g-dev \
121+
libbz2-dev libreadline-dev libsqlite3-dev wget curl llvm \
122+
libncursesw5-dev xz-utils tk-dev libxml2-dev libxmlsec1-dev libffi-dev liblzma-dev
105123
```
124+
106125
2. Install [pyenv](https://github.com/pyenv/pyenv/) from [pyenv-installer](https://github.com/pyenv/pyenv-installer) by running.
126+
107127
```bash
108128
curl -L https://github.com/pyenv/pyenv-installer/raw/master/bin/pyenv-installer | bash
109129
```
130+
110131
3. Run `nano /etc/profile` and add the following
132+
111133
```bash
112134
export PYENV_ROOT="/root/.pyenv"
113-
export PATH="$HOME/.pyenv/bin:$PATH"
135+
export PATH="/root/.pyenv/bin:$PATH"
114136
eval "$(pyenv init --path)"
115137
eval "$(pyenv virtualenv-init -)"
116138
```
139+
117140
4. Exit start Debian again.
118141
5. Run `pyenv versions` to list all installable versions.
119142
6. Run `pyenv install version` to install the desired python version.
120-
> The build process may take some time (an hour or 2 depending on your device).
143+
> The build process may take some time (an hour or 2 depending on your device).
121144
7. Run `touch /root/.pyenv/version && echo "your_version_here" > /root/.pyenv/version`
122145
8. (You may have to start Debian again) Run `python3 -V` to verify if PATH works or not.
123-
> If `python3` doesnt work but pyenv says thst the install was successfull in step 6 then try running `$PYENV_ROOT/versions/your_version/bin/python3`.
124-
9. You can now swith users by `su - username` and try runnning `python3 -V` and `pip -V` to check if it works or not.
146+
> 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`.
147+
9. You can now switch users by `su - username` and try running `python3 -V` and `pip -V` to check if it works or not.

0 commit comments

Comments
 (0)