You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/termux.md
+54-31Lines changed: 54 additions & 31 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -5,60 +5,71 @@
5
5
-[Install](#install)
6
6
-[Upgrade](#upgrade)
7
7
-[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)
10
12
11
13
<!-- END doctoc generated TOC please keep comment here to allow auto update -->
12
14
13
15
### Install
14
16
15
17
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`.\
18
19
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).
> 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
+
25
28
```bash
26
29
apt update
27
30
apt upgrade -y
28
31
apt-get install nano vim sudo curl wget git -y
29
32
```
33
+
30
34
4. Then create a new user to use later and change its password.
35
+
31
36
```bash
32
37
useradd username -m
33
38
passwd username
34
39
```
40
+
35
41
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.
41
48
42
49
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`.
43
50
8. You don't need to install yarn.
44
-
9. Now you are ready to install codeserver 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.
50
57
51
58
11. To install `code-server` run the following.
52
59
53
60
To check the install process (Will not actually install code-server)
61
+
54
62
```bash
55
63
curl -fsSL https://code-server.dev/install.sh | sh -s -- --dry-run
56
64
```
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
+
58
68
```bash
59
69
curl -fsSL https://code-server.dev/install.sh | sh
60
70
```
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.
62
73
63
74
### Upgrade
64
75
@@ -71,7 +82,8 @@ curl -fsSL https://code-server.dev/install.sh | sh
71
82
72
83
Issue : Using git in the `/sdcard` directory will fail during cloning/commit/staging/etc...\
73
84
Fix : None\
74
-
Potential Workaround :
85
+
Potential Workaround :
86
+
75
87
1. Create a soft-link from the debian-fs to your folder in `/sdcard`
76
88
2. Use git from termux (preferred)
77
89
@@ -81,44 +93,55 @@ Potential Workaround :
81
93
82
94
> From https://golang.org/doc/install
83
95
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
+
85
98
```bash
86
99
wget download_link
87
100
```
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
+
89
104
```bash
90
105
rm -rf /usr/local/go && tar -C /usr/local -xzf archive_name
91
106
```
107
+
92
108
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.
94
110
5. Check if your install was successful by running `go version`
95
111
96
112
#### Install Python
97
113
98
114
> Run these commands as root
99
115
100
116
1. Run the following command to install required packages to build python.
0 commit comments