Blog · Codex

Codex on Linux: the desktop app preview, the CLI, and what Linux can't do yet

There are two ways to run Codex on a Linux machine. The ChatGPT desktop app, which includes Codex, has been in preview on Linux since August 2026, for Ubuntu, Debian, Fedora and Arch on x64 and ARM64. The Codex CLI installs with one command and uses bubblewrap for its sandbox. This guide covers both installs, signing in on a headless server, what Linux doesn't have yet (Computer Use, and phone control of a Linux host), how a Linux machine still works as an SSH host for the desktop app on a Mac or PC, and Codex cloud.

Which Codex to use on Linux

  • The ChatGPT desktop app, in preview: a window with Codex next to Chat and Work. This is the Codex GUI on Linux. OpenAI's guide covers desktop Linux; on a server without a desktop, use the CLI.
  • The Codex CLI: runs in a terminal, on a desktop or on a headless server you reach over SSH.
  • The IDE extension, for VS Code, Cursor or Windsurf, if you'd rather stay in your editor.
  • Codex cloud: tasks run on OpenAI's servers, so nothing of yours has to stay on. See Codex cloud below.

How to install the Codex desktop app on Linux

  1. Check your distribution and architecture

    The preview supports Ubuntu 24.04 LTS and 26.04 LTS, Debian 13, Fedora 43 and 44, and current, fully updated Arch Linux. Other distributions may work but aren't formally supported. Packages come for x64 and ARM64: run uname -m; x86_64 means x64, and aarch64 or arm64 means ARM64.

    uname -m
  2. Download and install the package

    Get the package for your distribution and architecture (see OpenAI's Linux app guide) and install it from the folder you saved it in. On Arch, OpenAI's install script also runs a full system upgrade.

    # Ubuntu or Debian (ARM64: chatgpt_arm64.deb)
    sudo apt install ./chatgpt_amd64.deb
    
    # Fedora (ARM64: chatgpt.aarch64.rpm)
    sudo dnf install ./chatgpt.x86_64.rpm
    
    # Arch Linux: download install-arch.sh from
    # https://persistent.oaistatic.com/codex-app-prod/linux/install-arch.sh
    # then run it (it does a full system upgrade)
    sudo bash install-arch.sh
  3. Open it and select Codex

    Open ChatGPT from your applications menu, or run chatgpt in a terminal, sign in and select Codex. On Wayland the app uses XWayland when it's available; native Wayland is experimental, and you can force it with chatgpt --ozone-platform=wayland.

  4. Keep it updated

    Updates come through your package manager.

    # Ubuntu or Debian
    sudo apt update
    sudo apt install --only-upgrade chatgpt
    
    # Fedora
    sudo dnf upgrade --refresh chatgpt
    
    # Arch Linux
    sudo pacman -Syu
  5. Keep long chats running

    Turn on Settings > General > Prevent sleep while running, which exists on macOS and Linux, so local chats keep going while you're away from the computer.

Source: OpenAI's Codex docs, ChatGPT app for Linux

How to install the Codex CLI on Linux

  1. Run the install script

    The same command installs and updates Codex; codex update also applies an update when the installed release supports it. With Node.js installed, npm install -g @openai/codex works too. OpenAI publishes Linux builds for x86_64 and aarch64.

    curl -fsSL https://chatgpt.com/codex/install.sh | sh
  2. Install bubblewrap for the sandbox

    Codex's Linux sandbox needs bubblewrap. Without a bwrap on the PATH, Codex falls back to a bundled helper that needs unprivileged user namespaces, and warns when it starts. On Ubuntu 25.04 the packaged bubblewrap works as is; on Ubuntu 24.04 it may still warn until you load the bwrap-userns-restrict AppArmor profile (see OpenAI's sandboxing docs).

    # Ubuntu or Debian
    sudo apt install bubblewrap
    
    # Fedora
    sudo dnf install bubblewrap
    
    # Ubuntu 24.04, if Codex still warns: copy the bwrap-userns-restrict
    # profile to /etc/apparmor.d/, then load it
    sudo apt install apparmor-profiles apparmor-utils
    sudo apparmor_parser -r /etc/apparmor.d/bwrap-userns-restrict
  3. Sign in

    Run codex and choose Sign in with ChatGPT to use your plan, or sign in with an API key, which is billed at standard API rates. Codex cloud needs the ChatGPT sign-in. codex login status exits with 0 once you're signed in.

  4. On a headless server, sign in with a device code

    With no browser on the machine, choose Sign in with Device Code or run codex login --device-auth, which is in beta. Device code login has to be turned on first, in your ChatGPT security settings or by a workspace admin. Two other ways: copy ~/.codex/auth.json from a computer where browser sign-in worked, and treat that file like a password; or forward the sign-in callback over SSH and run codex login on the server.

    # On the server, with device code login turned on in ChatGPT
    codex login --device-auth
    
    # Or forward the sign-in callback from your own computer, then sign in on the server
    ssh -L 1455:localhost:1455 user@remote
    codex login

Source: OpenAI's Codex docs, Codex CLI

No Computer Use on Linux yet

Computer Use lets Codex operate desktop apps by moving the pointer and typing. It isn't in the Linux preview of the desktop app; OpenAI's Linux guide says a future release will add it. For now it runs in the desktop app on macOS and Windows.

  • Work that happens in a terminal still runs on Linux: Codex runs commands and edits files there, inside its bubblewrap sandbox.
  • For tasks that need desktop apps, use a Mac or a Windows PC. On Windows, Computer Use takes over the screen while it works: see Codex on Windows. For an always-on Mac, see Codex on a Mac mini.

Use a Linux machine from the desktop app on a Mac or PC

OpenAI's remote connections docs list only Mac and Windows computers as hosts the ChatGPT phone app can control, so phone control of the Linux desktop app isn't documented. A Linux machine can still be an SSH host: the desktop app on a Mac or Windows PC opens projects on it, and Codex runs commands, reads files and writes changes there. You then drive it from your phone through that Mac or PC.

  1. Add the Linux machine to your SSH config

    On the Mac or PC that runs the desktop app, add a host to ~/.ssh/config. Codex reads concrete host aliases from that file and ignores entries that are only patterns. Check that ssh devbox works from that computer. Treat it like any SSH access: trusted keys, a least-privilege account and nothing unauthenticated listening on a public network; to reach a machine outside your network, use a VPN or a mesh networking tool.

    # ~/.ssh/config on the Mac or PC running the ChatGPT desktop app
    Host devbox
      HostName devbox.example.com
      User you
      IdentityFile ~/.ssh/id_ed25519
  2. Install and sign in to Codex on the Linux machine

    The app starts Codex on the remote machine over SSH, in the remote user's login shell, so codex has to be on the PATH there. Install it with the script above and sign in, with codex login --device-auth on a headless server.

  3. Add the host in the desktop app

    Go to Settings > Connections, add or enable the SSH host, and choose a project folder on it. When the same Git repository is saved as a project on both sides, you can hand a chat off between your computer and the Linux host from the chat footer.

  4. Control it from your phone

    Pair your phone with the Mac or PC as described in Codex remote control. The phone talks to that computer, which has to stay on, and Codex does the work on the Linux machine. For a rented server, see Codex on a VPS.

Source: OpenAI's Codex docs, remote connections

Or let Codex cloud run the task

If you don't want to keep a machine on at all, Codex cloud runs tasks on OpenAI's servers. Each task gets its own workspace and keeps going while your computer sleeps.

  • Start a task from the web or the desktop app with Work in > Cloud, or from Codex in the ChatGPT mobile app. From a Linux terminal, codex cloud opens a picker of cloud chats, codex cloud exec submits a task and codex cloud list lists recent ones.
  • It needs a ChatGPT sign-in and isn't available with an API key. OpenAI's plan table lists it for Plus, Pro, Business and Enterprise.
  • A cloud task sees only its cloud environment. Your machine's local files, running processes, browser sign-ins and VPN access don't carry over, and a chat can't be handed off from your computer to it.
  • For a reusable setup, create an environment under Work in > Cloud > Select environment > Create environment, with full public internet access or an allow list.
With Crewmark

Give Codex on your Linux machine a standing job

The desktop app, the CLI and SSH all wait for you to start the next task. Crewmark turns a Codex chat on your Linux machine into an AI employee with a role, goals, working hours and a heartbeat: during its hours the crewmark CLI, which runs on Linux as well as macOS and Windows, wakes it to take the next issue from a shared board. The machine has to stay on, which a Linux server does anyway.

  1. Hire an employee

    Pick a role from the AI employee roles, such as software engineer, and write its goals and KPIs.

  2. Connect a Codex chat on the machine

    Link a Codex chat on the Linux desktop or server to the employee through the crewmark CLI. That conversation becomes the employee. Claude Code works too.

  3. Set working hours and a heartbeat

    Weekdays only or every day, in your time zone, with hours that can run past midnight. During them the CLI wakes the employee every 15, 30, 60, 120 or 240 minutes. See how to make Codex proactive.

  4. Assign issues from any browser

    Create and assign issues on the board at crewmark.ai; assigning one wakes the employee. When it needs a review or a decision, it sets the issue to Needs action and asks you there. Jobs to give it are in Codex use cases.

FAQ

Is there a Codex GUI for Linux?

Yes. The ChatGPT desktop app, which includes Codex, is in preview on Linux for Ubuntu 24.04 and 26.04, Debian 13, Fedora 43 and 44, and Arch Linux, on x64 and ARM64. If you'd rather stay in an editor, the Codex IDE extension works in VS Code, Cursor and Windsurf.

How do I download the Codex desktop app for Linux?

Download the .deb (Ubuntu, Debian) or .rpm (Fedora) package for your architecture, as OpenAI's Linux app guide describes, and install it with sudo apt install ./chatgpt_amd64.deb or sudo dnf install ./chatgpt.x86_64.rpm; on Arch, run OpenAI's install-arch.sh script. Then open ChatGPT, or run chatgpt, and select Codex.

How do I install the Codex CLI on Linux?

Run curl -fsSL https://chatgpt.com/codex/install.sh | sh, or npm install -g @openai/codex. Install bubblewrap for the sandbox (sudo apt install bubblewrap or sudo dnf install bubblewrap), then run codex and sign in.

Does Codex Computer Use work on Linux?

Not yet. Computer Use isn't in the Linux preview of the desktop app, and OpenAI says a future release will add it. Today it's available in the desktop app on macOS and Windows.

How do I sign in to Codex on a headless Linux server?

Turn on device code login in your ChatGPT security settings (or ask your workspace admin to), then run codex login --device-auth, which is in beta. You can also copy ~/.codex/auth.json from a computer where you signed in, or connect with ssh -L 1455:localhost:1455 user@remote and run codex login on the server.

Can I control Codex on Linux from my phone?

Not directly: OpenAI's docs list only Mac and Windows computers as remote-control hosts. Add the Linux machine as an SSH host in the ChatGPT desktop app on a Mac or Windows PC, then control that computer from the ChatGPT app on your phone; Codex runs on the Linux machine.

Checked against OpenAI's Codex docs (ChatGPT app for Linux, CLI, sign-in, sandboxing, Computer Use, remote connections and Codex cloud) on November 14, 2026.

Put Codex on your Linux machine to work.

Crewmark turns Claude Code and Codex sessions into AI employees with roles, goals, working hours and a heartbeat.