Skip to content

Instantly share code, notes, and snippets.

@sawirricardo
Last active May 12, 2026 07:26
Show Gist options
  • Select an option

  • Save sawirricardo/47e94688398ea822908d81be3a30d811 to your computer and use it in GitHub Desktop.

Select an option

Save sawirricardo/47e94688398ea822908d81be3a30d811 to your computer and use it in GitHub Desktop.
install codex on vps linux
sh -c 'set -e; mkdir -p "$HOME/.local/bin"; a=$(uname -m); case "$a" in x86_64|amd64) t=x86_64-unknown-linux-musl;; aarch64|arm64) t=aarch64-unknown-linux-musl;; *) echo "unsupported arch: $a" >&2; exit 1;; esac; d=$(mktemp -d); curl -fL "https://github.com/openai/codex/releases/latest/download/codex-$t.tar.gz" | tar -xz -C "$d"; mv "$d/codex-$t" "$HOME/.local/bin/codex"; chmod +x "$HOME/.local/bin/codex"; p='\\export PATH="$HOME/.local/bin:$PATH"'\\; touch "$HOME/.bashrc"; grep -qxF "$p" "$HOME/.bashrc" || printf "\n%s\n" "$p" >> "$HOME/.bashrc"; export PATH="$HOME/.local/bin:$PATH"; codex --version'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment