As a workaround for the lack of native support at the moment, and the manual setup/management required was annoying me, I've knocked up a shell script to manage Claude Code running under Linuxulator, tested on arm64 and aarch64 (under QEMU, not got a native host to test on at the moment) on 15.0p5 and latest 14.4/14.3 in VMs and jails. It's not a perfect solution, but will cleanly uninstall itself with a built-in command when we (hopefully) get the native port. Fairly heavily battle tested on the native installs and checks for common areas where you can shoot yourself in the foot, seems to work fine in jails too. Had Claude Code do the heavy lifting for me, but I've sanity checked it myself. Requires Linuxulator running and one of the Rocky/CentOS bases installed and configured correctly, included all the info required on the README, but it's mostly following the same info that's in the handbook, with a couple of extra notes.
Install and manage Claude Code on FreeBSD via Linuxulator - insanityinside/claude-freebsd
github.com
Hopefully it'll make life easier for folk while we're stuck in the current situation, any feedback is welcome.
Installing Claude Code on FreeBSD 13
Installing Dependencies inside the Jail
pkg update
pkg install -y bash curl ca_root_nss linux_base-rl9
Mount the required filesystems: (MAIN root)
Set the jail path:
set J = /jails/www # MY Path !!!!
Create the required Linux compatibility directories:
mkdir -p $J/compat/linux/dev/fd
mkdir -p $J/compat/linux/dev/shm
mount -t devfs devfs $J/compat/linux/dev
mount -t linprocfs linproc $J/compat/linux/proc
mount -t linsysfs linsys $J/compat/linux/sys
mount -t fdescfs -o linrdlnk fdesc $J/compat/linux/dev/fd
mount -t tmpfs -o mode=1777 tmpfs $J/compat/linux/dev/shm
/etc/fstab
Add the following entries to /etc/fstab on the host system: ( if need

devfs /jails/www/compat/linux/dev devfs rw,late 0 0
linprocfs /jails/www/compat/linux/proc linprocfs rw,late 0 0
linsysfs /jails/www/compat/linux/sys linsysfs rw,late 0 0
fdesc /jails/www/compat/linux/dev/fd fdescfs rw,linrdlnk,late 0 0
tmpfs /jails/www/compat/linux/dev/shm tmpfs rw,mode=1777,late 0 0
Check That
Inside the jail, run:
ls -la /compat/linux/dev/fd/0
Important: the output must show a symlink, for example:
/dev/pts/1
or:
/dev/null
It must not show a character device. If it does, the installer will not work.
Bypassing the OS Check with a Fake
The Anthropic installer refuses to run when it detects FreeBSD. To work around this, create a wrapper script that makes the system appear as Linux.
To avoid EOF parsing errors in csh, use the standard sh shell.
Enter /bin/sh:
/bin/sh
Then run the following block:
mkdir -p /tmp/fakebin
cat > /tmp/fakebin/uname <<'FAKEEOF'
#!/bin/sh
case "$1" in
-s) echo "Linux" ;;
-m) echo "x86_64" ;;
-sm|-ms) echo "Linux x86_64" ;;
-r) echo "5.15.0" ;;
-o) echo "GNU/Linux" ;;
-a) echo "Linux fakehost 5.15.0 x86_64 GNU/Linux" ;;
*) /usr/bin/uname "$@" ;;
esac
FAKEEOF
chmod +x /tmp/fakebin/uname
exit
Downloading and Installing Claude Code inside the Jail
Download the original installer and run it with the fake uname placed at the beginning of the PATH variable:
mkdir -p /tmp/claude-install && cd /tmp/claude-install
curl -fsSL
https://claude.ai/install.sh -o claude-install.sh
Run the installer with the modified environment:
env PATH="/tmp/fakebin:$PATH" /usr/local/bin/bash ./claude-install.sh
Debugging if Needed
If the installer exits silently, run it with tracing enabled.
Since you are using csh, the syntax for redirecting output streams should be:
env PATH="/tmp/fakebin:$PATH" /usr/local/bin/bash -x ./claude-install.sh >& /tmp/ci.log
tail -60 /tmp/ci.log
Checking the Installed Version
Run: #claude -v
2.1.175 (Claude Code)
Victory !!!
PS:
Antigravity 2 is installed using the same method.