---
title: Termux environment setup guide
title_en: Termux environment setup guide
description: Installing the Cascadia Mono NF font and Claude Code in Termux, plus working around the /tmp/claude permission issue.
sidebar_label: Termux setup
---

# Termux environment setup guide

## 1. Install the Cascadia Mono NF font

> Source: Microsoft's official [microsoft/cascadia-code](https://github.com/microsoft/cascadia-code) v2404.23

```bash
# 1. Install unzip (if not already installed)
pkg install unzip -y

# 2. Download the official Microsoft release zip
curl -fsSL -o ~/cascadia.zip https://github.com/microsoft/cascadia-code/releases/download/v2404.23/CascadiaCode-2404.23.zip

# 3. Extract
mkdir -p ~/cascadia
unzip ~/cascadia.zip -d ~/cascadia

# 4. Copy the font to Termux's font location
mkdir -p ~/.termux
cp ~/cascadia/ttf/static/CascadiaMonoNF-Regular.ttf ~/.termux/font.ttf

# 5. Apply
termux-reload-settings

# 6. Clean up
rm -rf ~/cascadia ~/cascadia.zip
```

### Notes

- Termux only reads `~/.termux/font.ttf`. Drop a font there and reload — that's it.
- Use **Cascadia Mono NF** (no ligatures) rather than Cascadia Code NF (with ligatures) to avoid terminal layout issues.
- For ligatures, change step 4 to:
  ```bash
  cp ~/cascadia/ttf/static/CascadiaCodeNF-Regular.ttf ~/.termux/font.ttf
  ```
- `/tmp` may not be writable in Termux — put all temp files under `~/` instead.

---

## 2. Install Claude Code

> The official native installer (`curl | bash`) does not work in Termux: the Linux ARM64 binary it downloads depends on the standard Linux dynamic linker, which is incompatible with Termux's Android ABI (`e_type` error). Use npm instead.

### Installation steps

```bash
# 1. Update Termux and install dependencies
pkg update -y && pkg upgrade -y
pkg install nodejs git -y

# 2. Install Claude Code via npm
npm install -g @anthropic-ai/claude-code

# 3. Create an alias (the npm version doesn't ship a global CLI shim)
alias claude='node /data/data/com.termux/files/usr/lib/node_modules/@anthropic-ai/claude-code/cli.js'

# 4. Persist it to bashrc
echo "alias claude='node /data/data/com.termux/files/usr/lib/node_modules/@anthropic-ai/claude-code/cli.js'" >> ~/.bashrc

# 5. Test
claude --version
```

### Known issue: `/tmp/claude` permission error

Claude Code hardcodes the `/tmp/claude` path. On Termux, long-running commands may fail with `EACCES: permission denied`.

**How to tell:** just use it normally — if you don't see the error, you don't need to do anything.

**If you hit it, bind-mount tmp via proot:**

```bash
# Install proot
pkg install proot -y

# Launch claude via proot
proot -b /data/data/com.termux/files/usr/tmp:/tmp claude
```

You can also bake the proot version into the alias:

```bash
alias claude='proot -b /data/data/com.termux/files/usr/tmp:/tmp node /data/data/com.termux/files/usr/lib/node_modules/@anthropic-ai/claude-code/cli.js'
```

### Updating Claude Code

```bash
npm install -g @anthropic-ai/claude-code
```
