OmniscioGuidesClaude Code in Termux
Claude Code in Termux on Android
Termux is a capable terminal, and people do get Claude Code running in it. It is worth knowing exactly where that stops being supported, and what breaks first, before you spend an evening on it.
Last checked against Anthropic's documentation on November 26, 2026. By the Omniscio team. Updated .
Is Claude Code supported on Android or Termux?
No. Anthropic's requirements hold five bullets: macOS 13.0 or later, Windows 10 1809 or later (or Windows Server 2019 or later), Ubuntu 20.04 or later, Debian 10 or later, and Alpine Linux 3.19 or later. Android appears nowhere on that list, and Termux is not a Linux distribution in that sense — it is an Android app.
The npm package makes the gap concrete. Anthropic lists the platforms it publishes binaries for: darwin-arm64, darwin-x64, linux-x64, linux-arm64, linux-x64-musl, linux-arm64-musl, win32-x64 and win32-arm64. Four of those are Linux builds, split by libc: glibc and musl. There is no Android variant.
That matters because of what Termux is built on. Termux describes itself as an Android terminal application and Linux environment, which is accurate — but it runs on Android's own C library, bionic, rather than glibc or musl, and Android's dynamic linker lives at /system/bin/linker64 for a 64-bit program (/system/bin/linker for a 32-bit one) rather than the ld-linux path a glibc binary asks for.
The mismatch has a documented symptom. Anthropic's install troubleshooting describes errors about missing shared libraries such as ld-linux-aarch64.so.1 as the sign that the wrong libc variant was installed, and tells you to check with ldd --version. Termux ships no glibc, so that check has nothing to report on: ldd is not part of Termux's base install.
What happens if I install it in Termux anyway?
The binary cannot start against bionic, so the bare install fails — with the loader error above, or with Illegal instruction, which Anthropic describes as the binary using CPU instructions your processor does not support and for which it says there is no native-binary workaround.
Anthropic also says the alternative install methods download the same native binary, so npm will not rescue the attempt. Every route lands on the same executable.
The ceiling is not only the libc. Claude Code asks for 4 GB of RAM on an x64 or ARM64 processor, and in Termux that is the phone's memory, shared with Android and every other app on it.
Two community setups get it running anyway, by supplying the glibc Termux lacks: the native binary under glibc-runner, which is the arrangement the clipboard issue below was filed from, or a Debian container run by proot-distro. Neither is supported by Anthropic, and the proot-distro route is covered next.
Does the proot-distro route work?
This is the second of the two routes, and the tidier one. proot-distro, a Termux project, creates rootless Linux containers inside Termux by pulling Docker or OCI images — Debian among them — so Claude Code finds the glibc it was built against and the rest of a normal Debian userland around it.
The shape of it:
pkg install proot-distro
proot-distro install debian
proot-distro login debianInside that Debian session the install is the normal Linux one, and the steps are on install Claude Code on Linux:
apt update && apt install -y curl
curl -fsSL https://claude.ai/install.sh | bashUnderstand what you have built. Anthropic supports Debian 10 or later, but not Debian running under proot on Android inside a phone. Nothing about the container makes the rest of the platform disappear: Android still decides when to kill your processes, and anything you want from the phone — files, clipboard, battery — has to be reached through the container rather than directly.
The first thing that bites is Android's process management. Termux's own README warns that on Android 12 and later the system kills processes beyond a system-wide limit of 32 and kills any process using excessive CPU, which shows up as [Process completed (signal 9) - press Enter]. A Claude Code session that builds, tests or runs several agents crosses that line easily.
Known issues in Termux, and what to do about them
The session dies with signal 9
This is Android's own process management, not Claude Code. Termux documents the cause and points at the phantom-process notes for the settings that disable the trimming; its README says an option to disable the killing should be available in Android 12L or 13.
Every copy floods the screen with base64
Claude Code writes copies to the system clipboard through the OSC 52 terminal escape, and Termux aborts any OSC string past a fixed length — 8192 characters in Termux 0.118.x. The copy is sent base64-encoded, which is why a few kilobytes of text is enough to cross that line: over roughly 6 KB, the clipboard is left unchanged and the rest of the encoded payload is printed as text. The issue is open, and no setting turns the escape off.
Workarounds for the clipboard
Keep individual copies small, and write the result to a file when you need the whole thing out. Termux's own clipboard tool, termux-clipboard-set from Termux:API, has no length limit; Claude Code does not call it, which is the substance of the open issue.
Hardcoded /tmp paths fail
This is the glibc-runner route's problem, not the container's, whose own /tmp is writable. Android does not allow writes to /tmp, and Claude Code hardcodes /tmp/claude paths for sandbox temporary files and screenshots. On Termux that surfaces as a permission error. The reported workaround is editing the bundled cli.js to point at $TMPDIR, which an update undoes.
The keyboard does not open
Under proot-distro, tapping the input line does not raise the on-screen keyboard: the taps are read as mouse events, so Termux never gets the tap that would open it. The reported fix is to turn Claude Code's mouse handling off:
export CLAUDE_CODE_DISABLE_MOUSE=1
claudeThe issue gives that setting as its workaround, so start sessions with it while the report is open.
How do I confirm it works?
Anthropic's own check comes first, and it works the same inside the container as on a laptop. Open a new shell after installing, because the installer's directory is not on the PATH of the shell you installed from:
claude --version
claude doctorclaude --version printing a version number means the binary runs. claude doctor prints read-only installation and settings diagnostics without starting a session, so it tells you whether the install is healthy before you spend a session on a phone that may kill it.
Then check the things Termux adds, which claude doctor knows nothing about:
- Start a session that runs a build, and see whether it survives. Signal 9 is the phone, not the install.
- Copy a long paragraph and check the Android clipboard actually received it.
- If you run the binary directly in Termux rather than in the container, ask Claude to write a temporary file and see whether Android lets it.
What should I do instead?
Three routes keep the phone and drop the unsupported part:
- SSH into a machine that supports Claude Code. Install an SSH client from Termux's package manager (
pkg install openssh), connect to a Linux machine that meets the requirements, and run Claude Code there. The terminal is then only a window; nothing runs on the phone. The setup on the far side is install Claude Code on Linux. - Cloud sessions in the Claude app. The app for Android starts and monitors Claude Code cloud sessions, so the work runs on Anthropic's side and the phone is only the screen. Claude Code on a phone covers that surface in full.
- Remote Control. If a session is already running on your own computer, Remote Control lets you drive it from the phone or a browser. The details are on the Remote Control guide.
If you only need Claude Code on a small machine you own, a Raspberry Pi 4 or 5 with 4 GB of memory or more meets Anthropic's published hardware floor, though Anthropic does not name the board itself — Claude Code on a Raspberry Pi covers which boards clear the requirement.
Where these answers come from
- Anthropic's advanced setup page, read November 26, 2026: the operating-system list, the hardware floor, the install command, the npm platform list, and the
claude doctorcheck. - Anthropic's install troubleshooting, Linux musl or glibc binary mismatch, read November 26, 2026: the missing
ld-linuxlibrary error and theldd --versioncheck. - The same page, Illegal instruction, read November 26, 2026: the two documented causes and the statement that no native-binary workaround exists.
- Termux's own repository README, read November 26, 2026: what Termux is, the Android version it needs, the phantom-process limit on Android 12 and later, and the signal 9 message.
- Android's bionic source, read November 26, 2026: bionic is Android's C library and dynamic linker, and the linker is
/system/bin/linker64. - proot-distro, read November 26, 2026: rootless Linux containers inside Termux, built from Docker or OCI images.
- Termux's own package repository, read November 26, 2026: the openssh package the SSH route installs.
- Claude Code issue 15637, 106886 and 106540, read November 26, 2026: the
/tmppermission failure, the OSC 52 clipboard truncation, and the on-screen keyboard bug. - Anthropic's platforms page, read November 26, 2026: the Claude app for Android, cloud sessions, and Remote Control.
Common questions
Can I run Claude Code in Termux?
Not natively, and not as a supported setup. Anthropic's platform list names macOS, Windows, Ubuntu, Debian and Alpine, with no Android entry. Its Linux builds cover glibc and musl on x64 and ARM64, and there is nothing for Android. Android's C library and dynamic linker are bionic, so the Linux build has no interpreter to start under in Termux itself.
Does Claude Code have an Android app?
There is a Claude app for Android, but it is not a terminal: it starts and monitors cloud sessions, and it can drive a session running on your own machine through Remote Control. The terminal CLI has no Android build.
What is the proot-distro route?
proot-distro, a Termux project, creates rootless Linux containers inside Termux by pulling Docker or OCI images, so you can install Debian and run Claude Code inside it. That gives the binary the glibc it expects, but the whole setup stays outside what Anthropic supports.
Why does the session die in Termux on Android 12 and later?
Termux's own README warns that Android 12 and later kill any processes beyond a system-wide limit of 32 and kill processes using excessive CPU, which shows up as a Process completed (signal 9) line. A long Claude Code session runs more processes than that.
What should I use instead of Termux?
Run Claude Code on a machine it supports and reach it from the phone: a Linux machine over SSH, a cloud session from the Claude app for Android, or Remote Control for a session already running on your own computer.