Sample Header Ad - 728x90

Unix & Linux Stack Exchange

Q&A for users of Linux, FreeBSD and other Unix-like operating systems

Latest Questions

0 votes
1 answers
4323 views
Can I Install Termux on Linux?
We can install a Linux sub-system like CentOS or Ubuntu on Termux, but is it possible to have a Termux-like sub-system on Linux? In Termux the installations of some packages are much easier with *pkg install*. And Termux provides many resources that cannot be obtained directly using one line of code...
We can install a Linux sub-system like CentOS or Ubuntu on Termux, but is it possible to have a Termux-like sub-system on Linux? In Termux the installations of some packages are much easier with *pkg install*. And Termux provides many resources that cannot be obtained directly using one line of code on pure Linux. I came up with this idea when I was learning Termux on my phone and found the limited screen and soft keyboard really troublesome. (don't tell me that I need an Android emulator or virtual machine)
Jiakai Jiang (1 rep)
Sep 27, 2021, 01:15 PM • Last activity: Aug 3, 2025, 03:00 AM
-3 votes
1 answers
216 views
Kali install rootless edition on termux failed with error 404
I'm trying to install Kali rootless edition on my smartphone within termux but I get error 404 when launching install-nethunter-termux I've follow the official site: https://www.kali.org/docs/nethunter/nethunter-rootless/ Please Can you help me ?
I'm trying to install Kali rootless edition on my smartphone within termux but I get error 404 when launching install-nethunter-termux I've follow the official site: https://www.kali.org/docs/nethunter/nethunter-rootless/ Please Can you help me ?
Michel Ellena (1 rep)
May 9, 2025, 06:09 AM • Last activity: May 9, 2025, 06:26 AM
0 votes
1 answers
1146 views
Why ifconfig command does not work due to permission denied when you connect to public WiFi or SSID?
This might be a bit stupid/naive question but I was at a conference event and after I connected to Free WiFi, I tried `ifconfig` in cmd of my cellphone via **Termux** and it did not work as follows: ```bash > ifconfig Warning: cannot open /proc/net/dev (Permission denied). Limited output. lo: flags=...
This might be a bit stupid/naive question but I was at a conference event and after I connected to Free WiFi, I tried ifconfig in cmd of my cellphone via **Termux** and it did not work as follows:
> ifconfig
Warning: cannot open /proc/net/dev (Permission denied). Limited output.
lo: flags=73  mtu 65536
        inet 127.0.0.1  netmask 255.0.0.0
        unspec 00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00  txqueuelen 1  (UNSPEC)

wlan0: flags=4163  mtu 1500
        inet XX.XX.75.132  netmask 255.255.224.0  broadcast XX.XX.95.255
        unspec 00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00  txqueuelen 1000  (UNSPEC)
before writing this post I thought used ipconfig but now I'm more curious why they closed/banned ifconfig command. Do they close this command when they configure the DHCP server to provide free internet access for the public or thesis configured somewhere else? and why? **Edit1:** as @Mircea Vutcovici proposed and commented - I installed getfacl via Termux on my cellphone and tried getfacl /proc/net/dev; it resulted in: > getfacl: /proc/net/dev: Permission denied - tried ls -lZd /proc/net/dev, it resulted in: > ls: cannot access '/proc/net/dev': Permission denied
Mario (101 rep)
Dec 5, 2024, 02:14 AM • Last activity: Dec 7, 2024, 03:15 PM
0 votes
0 answers
47 views
Assistance requested with fixing a bash backup script for a Termux Linux Android tablet
BACKGROUND: I have been endeavouring to update my Android tablet with different versions of this script and even before I set my mind on realising this script in particular and have been at it for quite some time, but I have so far not been completely successful. It is almost there. My Termux Linux...
BACKGROUND: I have been endeavouring to update my Android tablet with different versions of this script and even before I set my mind on realising this script in particular and have been at it for quite some time, but I have so far not been completely successful. It is almost there. My Termux Linux userland environment is a bit of a legacy ecosystem. I have tried to set up my system well, but there are anomalies and inconsistencies. I have just been teaching myself and learning on the fly. In executing earlier versions of this script, it kept on maxing out the memory of my microSD, but there should have been more than ample space. The backup directories would be hundreds of times larger than the size of the original source directories. I realised it was infinite loops caused by nested symbolic links and probably other reasons that I have not yet identified. This is the reason for the structure of the script and the excessive logging. The problems are few (I hope): 1. A virulent unbounded variable in the backup\_files array. I just haven't been able to fix it and I don't know why. 2. I had a lot of problems with terminating all the spawned processes. Some of them were really sneaky. Hence, the KILLSWITCH. But I just can't get it to work and I don't know why. [https://pastebin.com/QrHgCiQ4](https://pastebin.com/QrHgCiQ4) Any assistance to help me bash this into shape would be most appreciated.
Beauford A. Stenberg (1 rep)
Oct 7, 2024, 10:50 PM
0 votes
2 answers
287 views
git clone error: bad line length character
I am trying to set up a GIT server in my LAN & use it with my Android phone through Termux. My PC runs Fedora Silverblue 40. Some tracelogs: * On my PC (all as user `git`): ``` $> ip addr show wlp5s0 | grep "inet " | awk '{print $2}' | cut -d '/' -f1 192.168.245.11 $> systemctl list-units | grep ssh...
I am trying to set up a GIT server in my LAN & use it with my Android phone through Termux. My PC runs Fedora Silverblue 40. Some tracelogs: * On my PC (all as user git):
$> ip addr show wlp5s0 | grep "inet " | awk '{print $2}' | cut -d '/' -f1
192.168.245.11
$> systemctl list-units | grep sshd.service
	sshd.service	loaded active running	OpenSSH server daemon
$> cat ~/.ssh/authorized_keys
ssh-ed25519 AAAAC3N[...]KBoG user@lan
$> ls -alps ~/.ssh/
total 4
0 drwx------. 1 git git  30 07-04 12:32 ./
0 drwx------. 1 git git 172 07-04 14:41 ../
4 -rw-------. 1 git git  92 07-04 13:07 authorized_keys
$> ls -alps ~/myrepo/user/
total 0
0 drwxr-xr-x. 1 git git 10 07-04 14:05 ./
0 drwxr-xr-x. 1 git git 12 07-04 14:05 ../
0 drwxr-xr-x. 1 git git 16 07-04 14:40 Notes/
$> ls -alps ~/myrepo/user/Notes/
total 4
0 drwxr-xr-x. 1 git git  16 07-04 14:40 ./
0 drwxr-xr-x. 1 git git  10 07-04 14:05 ../
0 drwxr-xr-x. 1 git git 144 07-05 16:34 .git/
4 -rw-r--r--. 1 git git   2 07-04 14:40 init
$> cd ~/myrepo/tsilvs/Notes/ && git status && cd ~
On branch main
nothing to commit, working tree clean
$> tail -n 4 ~/.bashrc
# Modified part
## Shell Session Start Message
CUR_TTY="$(tty)"
[ "$CUR_TTY" != "$SSH_TTY" ] && echo -e "Hello, $(whoami)!\n"
* On my Android device in Termux:
~ $ cat ~/.bashrc
eval "$(ssh-agent -s)"
ssh-add ~/.ssh/user.lan.001
~ $ eval "$(ssh-agent -s)"
Agent pid 6236
~ $ ssh-add .ssh/user.lan.001
Identity added: .ssh/user.lan.001 (user@lan)
~ $ cat .ssh/user.lan.001.pub
ssh-ed25519 AAAAC3N[...]KBoG user@lan
~ $ ssh-keygen -y -f .ssh/user.lan.001
ssh-ed25519 AAAAC3N[...]KBoG user@lan
~ $ ls -l .ssh/user.lan.001
-rw------- 1 u0_a196 u0_a196 399 Jul  4 14:03 .ssh/user.lan.001
~ $ ssh git@192.168.245.11 git-receive-pack /var/home/git/myrepo/user/Notes
00b1e1bbbef5f1220e0dc19be67fc2b6e66c5c5cb4dc refs/heads/mainreport-status report-status-v2 delete-refs side-band-64k quiet atomic ofs-delta object-format=sha1 agent=git/2.44.0
0000^C~ $                                              
~ $ git clone git@192.168.245.11:/var/home/git/myrepo/user/Notes
Cloning into 'Notes'...
fatal: protocol error: bad line length character: ?[47
fatal: the remote end hung up unexpectedly
~ $ ssh git@192.168.245.11
Last login: Sat Jul  6 12:47:58 2024
git@fed-001:~$>
~ $ ssh git@192.168.245.11 true
Hello, git!
Everything seems to be configured properly. For example, SSH sessions work perfectly fine. Why does the git clone terminate with an error?
tsilvs (99 rep)
Jul 6, 2024, 04:12 PM • Last activity: Jul 7, 2024, 06:37 PM
1 votes
1 answers
530 views
Termux proot-distro install fedora error
When I use `proot-distro`, it shows me this error: ```bash ~ $ proot-distro install fedora [*] Installing Fedora... [*] Creating directory '/data/data/com.termux/files/usr/var/lib/proot-distro/installed-rootfs/fedora'... [*] Creating directory '/data/data/com.termux/files/usr/var/lib/proot-distro/in...
When I use proot-distro, it shows me this error:
~ $ proot-distro install fedora
[*] Installing Fedora...
[*] Creating directory '/data/data/com.termux/files/usr/var/lib/proot-distro/installed-rootfs/fedora'...
[*] Creating directory '/data/data/com.termux/files/usr/var/lib/proot-distro/installed-rootfs/fedora/.l2s'...
[!] The distribution download URL is not defined for CPU architecture 'arm'.
[!] Exiting due to failure.
I searched about this on the web but didn't find anything useful. I also checked if it works for other distributions like Debian by running proot-distro install debian. I didn't let the installation finish; when I saw it had passed the URL error, I cancelled it using CTRL+C.
user23513146 (11 rep)
Mar 2, 2024, 02:55 AM • Last activity: Mar 3, 2024, 03:57 PM
-1 votes
1 answers
477 views
Termux Sessions
I am trying to see if there is a way to run multiple sessions in Termux with each session running in a different directory.  If I run `cd /storage/emulated/0/` in one session and run `cd $HOME` from my second session, can I then stay in both directories simultaneously?  Beca...
I am trying to see if there is a way to run multiple sessions in Termux with each session running in a different directory.  If I run cd /storage/emulated/0/ in one session and run cd $HOME from my second session, can I then stay in both directories simultaneously?  Because running certain packages requires that I maintain direct contact with $HOME.
DenDog1 (1 rep)
Feb 23, 2019, 12:37 PM • Last activity: Mar 3, 2024, 03:56 PM
8 votes
3 answers
23654 views
APT repositories on Android
I am using a terminal emulator on Android called "Termux". It comes with the APT command installed. However, the repository is very limited. What I want to do, is to see if larger repositories like that of Ubuntu and Debian can be used with it. Since I only want to use and install CLI programs (like...
I am using a terminal emulator on Android called "Termux". It comes with the APT command installed. However, the repository is very limited. What I want to do, is to see if larger repositories like that of Ubuntu and Debian can be used with it. Since I only want to use and install CLI programs (like cowsay), hopefully it shouldn't be a problem. Is this a good idea? If yes, how can it be done? If not, can individual packages be downloaded and installed any other easy way?
AvZ (233 rep)
Jan 14, 2016, 12:16 PM • Last activity: Mar 3, 2024, 10:55 AM
2 votes
2 answers
1630 views
How do I run termux on my laptop?
[Termux][1] is wonderful for getting the Unix experience on an Android device, but for development I really would like to have an emulator of Termux running on my GNU/Linux laptop. Maybe using Vagrant/Virtualbox? How do I do that? [1]: https://termux.com/ "Termux"
Termux is wonderful for getting the Unix experience on an Android device, but for development I really would like to have an emulator of Termux running on my GNU/Linux laptop. Maybe using Vagrant/Virtualbox? How do I do that?
Ole Tange (37348 rep)
Sep 12, 2016, 10:47 AM • Last activity: Mar 3, 2024, 10:54 AM
0 votes
0 answers
2234 views
How to configure Termux APT repositories in Debian?
I'm interested to configure the Termux repositories on a Debian system. However I got stuck on some point. *Any* help would be appreciated. ## Premise ## My scenario is as follows. I have an Android device running the Debian-alike Linux environment emulator [Termux](https://wiki.termux.com/wiki/Main...
I'm interested to configure the Termux repositories on a Debian system. However I got stuck on some point. *Any* help would be appreciated. ## Premise ## My scenario is as follows. I have an Android device running the Debian-alike Linux environment emulator [Termux](https://wiki.termux.com/wiki/Main_Page) employing the package manager [APT](https://wiki.debian.org/Apt) . Out of security reasons the device is [airgapped](https://en.wikipedia.org/wiki/Air_gap_(networking)) , so packages can not be retrieved from [Termux' remote repositories](https://github.com/termux/termux-packages/wiki/Mirrors) but have to be installed locally. To bring the necessary .deb files onto this device I therefore have to use an intermediate machine with online access to Termux' repositories. The packages needed would be downloaded there, but not installed, and than transferred to the target device. Obviously, the simple solution would be to use another Android device. However, for now I am bound to a PC running the minimalistic Debian-derivate [AntiX 22](https://antixlinux.com/) (matching Debian 11) in the core flavor. Note, that [Termux is not FHS compliant](https://wiki.termux.com/wiki/Differences_from_Linux) and therefore the usual Debian or Ubuntu repositories cannot be used. ## Aim ## To configure the Termux repository resp. one of its mirrors on a machine running Debian or a Debian-derivate, esp. AntiX. ## Steps ## I aimed at [Grimler's mirror](https://github.com/termux/termux-packages/wiki/Mirrors#mirrors-by-grimler) as it was recommended in various situations. Any other server would be fine, too. According to the Debian documentation's [Instructions to connect to a third-party repository](https://wiki.debian.org/DebianRepository/UseThirdParty) , Ubuntu's documentation article on [Third party repository usage](https://ubuntu.com/server/docs/third-party-apt-repositories) and various other sources, inter alia this [Stackoverflow post](https://stackoverflow.com/a/71384057) one has basically 4 steps to go: 1. Fetch the GPG key for the Termux repository 2. List the repo in an APT source file 3. Run apt update to integrate the repo 4. Configure the repo's pinning Note: apt-key is deprecated, however I tried also that. If one can show me the way employing apt-key, I won't mind, but that can only be an interim solution. ## Problem ## No matter what I try, I get stuck on step 3, when apt tells me:
Err https://grimler.se/termux-main  stable InRelease
The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 5A897D96E57CF20C
## Approaches ## I combined variations for steps 1-3. #### Tinkering on the GPG file #### I tried the [termux-keyring](https://grimler.se/termux-main/pool/main/t/termux-keyring/) package first. As mentioned one can't install it directly to a Debian system, so I took it apart, and placed all files manually into the right places. The public GPG files into /usr/share/termux-keyring/, resp. in another try in the already existing /usr/share/keyrings/. I also accordingly placed the symlinks -- in another try the files themselves -- into /etc/apt/trusted.gpg.d/ pointing to these GPG files. As it is actually not recommended to put something into /etc/apt/trusted.gpg.d/ I than removed the symlinks resp. the GPG files from there. Only /usr/share/keyrings/ has been used further. Getting paranoia that I'm using the wrong key files I also tried to use the public keys from [Grimler's homepage](https://grimler.se/pubkey/raw) and [Repository](https://grimler.se/termux-main/dists/stable) but without change. Dearmoring and armoring also yields nothing. #### The list file #### My /etc/apt/sources.list.d/grimler.list just contains the line
deb [signed-by=/usr/share/keyrings/grimler.gpg] https://grimler.se/termux-main  stable main
Leaving out the signed-by doesn't change anything, which I actually consider to be strange. Changing https to http makes no difference, too. #### Finding the unfound public key #### To solve the error message
Err https://grimler.se/termux-main  stable InRelease
The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 5A897D96E57CF20C
I naturally tried to solve the problem with
$ gpg --no-default-keyring --keyring grimler.gpg --keyserver keyserver.ubuntu.com --recv-keys 5A897D96E57CF20C
and
$ apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 5A897D96E57CF20C
and similar. Alas, though the key has been imported, the error message remained. ## Summary ## So, how do I configure a Termux repository in Debian? Esp. - Which keys do I have to use from where, and where to put them? Do they have to be modified in some way? - Is something missing in the source file? - How to feed APT the public key 5A897D96E57CF20C? Thanks in advance for your time and any helpful advice. Feel free to ask or comment, if need be I'll add further information.
Krokomot (101 rep)
Nov 5, 2023, 01:16 AM • Last activity: Mar 3, 2024, 10:38 AM
0 votes
1 answers
5216 views
Removing GitHub tools on termux?
I don't know if i can ask this question here or not. I have cloned some tools from GitHub on my termux. Then i ran the bash file "install.sh" that was a customized login with password tool. This is the [link][1] So now i want to delete it and make my login back to default. I did search it but i didn...
I don't know if i can ask this question here or not. I have cloned some tools from GitHub on my termux. Then i ran the bash file "install.sh" that was a customized login with password tool. This is the link So now i want to delete it and make my login back to default. I did search it but i didn't find the answer. Last time , i deleted my termux data to solve this problem. Thanks
C9_HP (3 rep)
Oct 15, 2023, 11:13 PM • Last activity: Mar 3, 2024, 10:38 AM
Showing page 1 of 11 total questions