So, to get started you need to get the base OS installed using the instructions from the official docs .
pkg update
pkg install bsdtar wget proot tergent tmux openssh
Tmux is a multiplexer that lets you run multiple persistent windows and sessions on a single terminal. I had trouble getting it working in the Arch proot, so a workaround is configuring tmux from your host Termux and then creating a tmux session and starting the chroot from there. For more information on using tmux read this article, and to learn how to customize the appearance and behaviors more try this one as well as looking at the tmux-plugins Github organization for community-built add-ons.
termux-setup-storage
wget https://sdrausty.github.io/TermuxArch/setupTermuxArch.sh
bash setupTermuxArch.sh
This should download fine using wget and start installing. The install itself will take around 15-30 minutes to extract the system and install everything. When the process finishes you'll be in a root shell in your new Arch distro! Of course, not everything will work out of the box.
You'll need to install sudo first, and the needed packages for the install:
pacman -Syyu sudo wget curl
If you encounter errors resolving hostnames, permissions may need to be reset for the resolv.conf
sudo chown root:root /etc/resolv.conf
sudo chmod 644 /etc/resolv.conf
Set your root password
sudo passwd root
And then you can make your user account
addauser <user>
This will log you in, so we'll exit back to the root shell to finish up
exit
Then set your user password
sudo passwd <user>
Open the sudoers file for safe editing:
visudo
And add your user's privileges under root's in the "User privilege specification" section
(a to begin editing after selection):
<user> ALL=(ALL) ALL
Save and close the file (ESC + :wq + ENTER)
If you encounter an error using sudo regarding RLIMIT_CORE then you'll need to
nano /etc/sudo.conf
And add this line:
Set disable_coredump false
Save and close it (CTRL-x + y + ENTER), and after this you're ready to use your login
su - <user>
Once you're user is set up, you can use a crash-tested script I made that should run through and handle any exceptions. If not, it should at least make it easy enough to figure out what went wrong. Download and run it with sudo to avoid repeating your password:
wget --no-check-certificate 'https://docs.google.com/uc?export=download&id=107Fh0l_p0ItVkUufOhP9to-OU_6KYhPW' -O fresharch.sh && chmod +x fresharch.sh && sudo bash fresharch.sh
If all the instructions were followed correctly yay should install and you'll have a functional Arch Linux with AUR support on your Android device.
sudo bash fresharch.sh не работает