All insights

Coding agents

How to Install Codex on Ubuntu

Install Codex CLI on Ubuntu or use Codex through the ChatGPT desktop app. Choose the right setup, follow the documented steps, and see what is known about production model APIs.

Illustration for How to install codex on ubuntu

Quick answer: For a terminal-based workflow, install Codex CLI with OpenAI’s installer and run codex. For a graphical workspace, install the ChatGPT Linux app, sign in, and select Codex. They are separate ways to use Codex, so choose the one that fits how you work. (Codex CLI quickstart)

Choose CLI or desktop

Option What you install Best fit
Codex CLI A command-line coding agent You want to work from a terminal or shell.
ChatGPT desktop app The ChatGPT app, with Codex available inside it You want a graphical app for opening local projects.

The desktop app is listed as available in public preview for Ubuntu 24.04 LTS and 26.04 LTS. The CLI installer is documented for Linux generally; the documentation cited here does not specify a minimum Ubuntu release for it. (ChatGPT release notes)

Option 1: Install Codex CLI

  1. Open a terminal and run the installer documented by OpenAI:

    curl -fsSL https://chatgpt.com/codex/install.sh | sh
    

    OpenAI also lists npm install -g @openai/codex as an alternative. (OpenAI Codex CLI repository)

  2. Change to the project directory where you want to work, then start Codex:

    cd ~/path/to/your/project
    codex
    
  3. On first run, follow the sign-in prompt. The quickstart says to choose Sign in with ChatGPT or another sign-in method offered in the CLI. Reaching the interactive Codex prompt confirms the CLI has launched; you can then give it a small task, such as asking it to explain the project. (Codex CLI quickstart)

Option 2: Install the ChatGPT desktop app and use Codex

This installs ChatGPT for Linux, not a separate package named Codex. Codex is a workspace inside the app.

  1. Check your processor architecture:

    uname -m
    

    If the output is x86_64, choose the x64/amd64 package. If it is aarch64 or arm64, choose ARM64. (Linux package architecture guidance)

  2. Go to the official ChatGPT download page and select Download for Linux. The official page confirms that Linux download entry, and the Linux guide gives separate x64 and ARM64 .deb filenames. However, the available page text does not establish the exact architecture-selection flow or direct package destinations. If you cannot identify the matching package in the official download flow, use the CLI steps above, which provide a complete installation route in this guide. (ChatGPT download page; ChatGPT desktop app for Linux guide)

  3. Once you have the matching .deb in ~/Downloads, install it. For x64:

    cd ~/Downloads
    sudo apt install ./chatgpt_amd64.deb
    

    For ARM64:

    cd ~/Downloads
    sudo apt install ./chatgpt_arm64.deb
    

    These local-package commands are in the official Linux guide.

  4. Open ChatGPT from your applications menu, or run chatgpt in a terminal. Sign in, select Codex, and open a project or local folder. (Official Linux guide)

Can Codex use a production model API?

OpenAI documents an Amazon Bedrock setup for local Codex workflows, including Codex CLI and the desktop app. Its guide says the setup does not apply to Codex configured with ChatGPT sign-in or an OpenAI API key. This establishes a Bedrock-specific route, not compatibility with every production API provider. (Configure Codex with Amazon Bedrock)

For TokenForgeCloud, the available material does not establish compatibility with Codex or confirm the provider configuration Codex would require. I can’t responsibly supply a TokenForgeCloud base URL, model identifier, credential setting, or test command. Check the provider’s current technical documentation against Codex’s requirements before using it; do not assume that an API described as “OpenAI-compatible” is sufficient.

Which route should you take?

  • Use the CLI for terminal-based work.
  • Use the desktop app for the graphical experience; Codex is accessed inside ChatGPT for Linux.
  • Use Amazon Bedrock only if that is your intended provider and you follow OpenAI’s Bedrock guide. TokenForgeCloud compatibility remains unconfirmed here.

Sources

Download ChatGPT

ChatGPT desktop app for Linux

Configure Codex with Amazon Bedrock

Codex CLI quickstart

OpenAI Codex CLI repository

ChatGPT release notes

Codex for Linux is finally here

Contact us