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
+15-1Lines changed: 15 additions & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -7,6 +7,7 @@
7
7
-[Known Issues](#known-issues)
8
8
-[Git won't work in `/sdcard`](#git-wont-work-in-sdcard)
9
9
-[Extra](#extra)
10
+
-[Create a new user](#create-a-new-user)
10
11
-[Install Go](#install-go)
11
12
-[Install Python](#install-python)
12
13
@@ -57,7 +58,7 @@ curl -fsSL https://code-server.dev/install.sh | sh
57
58
8. You can now start code server by simply running `code-server`.
58
59
59
60
> Consider using a new user instead of root, read [here](https://www.howtogeek.com/124950/htg-explains-why-you-shouldnt-log-into-your-linux-system-as-root/) why using root is not recommended.\
60
-
> Learn how to add a user [here](https://gist.github.com/arHSM/62242c343efc2827861ddc38e485d7df).
61
+
> Learn how to add a user [here](#create-a-new-user).
61
62
62
63
## Upgrade
63
64
@@ -77,6 +78,19 @@ Potential Workaround :
77
78
78
79
## Extra
79
80
81
+
### Create a new user
82
+
83
+
To create a new user follow these simple steps -
84
+
85
+
1. Create a new user by running `useradd username -m`.
86
+
2. Change the password by running `passwd username`.
87
+
3. Give your new user sudo access by runnning `visudo`, scroll down to `User privilege specification` and add the following line after root `username ALL=(ALL:ALL) ALL`.
88
+
4. Now edit the `/etc/passwd` file with your commadline editor of choice and at the end of the line that specifies your user change `/bin/sh` to `/bin/bash`.
89
+
5. Now switch users, by running `su - username`
90
+
91
+
- Remember the `-` betweeen `su` and username is required to execute `/etc/profile`,\
92
+
since `/etc/profile` may have some necessary things to be executed you should always add a `-`.
0 commit comments