73 lines
2.2 KiB
Plaintext
73 lines
2.2 KiB
Plaintext
* Phone computing
|
|
|
|
Smartphones are typically walled gardens, with few ways of running one's own
|
|
programs. However, on Android there exists a terminal emulator which opens up a
|
|
lot of opportunities, and which is the basis for my mobile computing; Termux.
|
|
|
|
Termux functions as a normal terminal emulator, so you can run any normal Linux
|
|
program on it. It comes with a package manager based on Debian's apt.
|
|
|
|
** Usage
|
|
|
|
The volume up and down keys correspond to holding down alt and ctrl
|
|
respectively. There's also many useful buttons present above the virtual
|
|
keyboard like the tab key among others.
|
|
|
|
** SSH server
|
|
|
|
I run an openssh server daemon on my phone to allow for file transfer between it
|
|
and my computer, as well as letting me run commands on it from my computer. It's
|
|
very simple to set up.
|
|
|
|
1. Run ``pkg install openssh`` to get the ``sshd`` binary.
|
|
|
|
2. Run ``sshd``.
|
|
|
|
3. Add your public key to the phones ``~/.ssh/authorized_keys`` file.
|
|
|
|
From here you can access the phone's files with ``sftp`` and run commands by
|
|
``ssh``'ing into it. You'll need the phone's IP address as well, which you can
|
|
get by running ``ip a`` on it (assuming you're connecting to it on the same
|
|
network). Remember that you need to login as the user on the phone, which you
|
|
can see with the ``whoami`` command.
|
|
|
|
** Accessing the rest of the phone's files
|
|
|
|
Termux has its own directory where it stores all your files. To access the other
|
|
files available on the phone like your pictures, music, etc. run
|
|
``termux-setup-storage``. This will create a symlink in your home directory to
|
|
the root of the phone's file system.
|
|
|
|
** The package manager
|
|
|
|
The package manager is very simple, and shares much of its functionality with
|
|
apt.
|
|
|
|
``
|
|
# Update the package repository
|
|
pkg update
|
|
|
|
# Update installed packages
|
|
pkg upgrade
|
|
|
|
# Install a new package
|
|
pkg install <package>
|
|
|
|
# Remove a package
|
|
pkg remove <package>
|
|
|
|
# Search for a package
|
|
pkg search <query>
|
|
|
|
# Some additional software repositories include root-repo, unstable-repo, and
|
|
# x11-repo. These can be installed with `pkg install':
|
|
pkg install root-repo
|
|
pkg install unstable-repo
|
|
pkg install x11-repo
|
|
``
|
|
|
|
One can also use apt directly, with its commands.
|
|
|
|
{https://archenoth.com/tech/2020/05/29/Roguelikes-in-Termux.html Roguelikes in
|
|
Termux}
|