Mike HolpJoin AI Income Lab ↗

Build guide · By · Published

Codex Linux setup: CLI and Codex desktop Linux guide

For Codex Linux setup, use the official CLI or the Codex desktop Linux preview, choosing a supported system from OpenAI’s installation guide.

Start by deciding where you want to work: a terminal, a desktop window, or your editor. Then install one client and get a small project task working before adding anything else. This guide separates the current official setup from the earlier community desktop recording, so an old video does not become an accidental installation checklist.

Codex desktop Linux: the official app status

The current documentation calls this the ChatGPT desktop app, with Codex available inside it. Install the app, sign in, choose a project or folder, then select Codex and start a new chat. That naming explains why a search for a Codex desktop download can lead to a ChatGPT page. Follow the official desktop quickstart.

The Linux preview lists Ubuntu 24.04 and 26.04 LTS, Debian 13, Fedora 43 and 44, and fully updated Arch Linux, with x64 and ARM64 packages. Use the download matching both your distribution and architecture. Ubuntu and Debian use a .deb; Fedora uses an .rpm; Arch has a separate script. See supported systems and downloads.

For example, after downloading the x64 Debian package into Downloads, OpenAI documents:

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

Use the ARM64 filename from the documentation if that is your machine. Later updates use the distribution’s package manager. Native Wayland support is experimental, and Computer Use is not yet available in the Linux preview. Those are specific limitations, not a claim of complete parity with other platforms. Source: Linux installation and limitations.

Codex Linux CLI install: choose one method

If your first goal is to work from a terminal, begin with the CLI. OpenAI’s quickstart documents this standalone installer for Linux:

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

The same command is documented for updates. Read the script before running it if you want to inspect what will execute. This is an alternative to the package-manager routes below; there is no reason to run every installer in sequence. Source: CLI installation.

npm

The official README documents:

npm install -g @openai/codex

Record that you used npm. When troubleshooting later, include the installation method alongside the exact error rather than simply saying that Codex is installed.

Homebrew

The README also lists brew install --cask codex. However, that listing alone does not establish that the cask is a supported Linux installation route. This guide does not recommend it for Linux; use the documented Linux installer or binary instead. Source: package-manager options.

Download a Linux binary

The README links releases and identifies codex-x86_64-unknown-linux-musl.tar.gz for x86_64 and codex-aarch64-unknown-linux-musl.tar.gz for ARM64. Extract the matching archive and rename its executable to codex, as the README suggests. Source: binary installation.

Keep a note of where you put that executable. A downloaded file and a command your terminal can find are two separate checkpoints; verify both before investigating account access.

Run Codex and sign in with ChatGPT

Open your project directory and run codex. On first launch, choose Sign in with ChatGPT and finish the sign-in flow. The CLI quickstart documents this sequence. Begin in the repository you intend to inspect, rather than starting in a folder containing unrelated work.

OpenAI’s help center says Codex is included across ChatGPT plans, including Free and Go, with limits varying by plan. That does not mean every account has the same allowance or cloud access. Check the account you actually signed into before treating an access message as an installation failure. Source: account access and usage.

For a remote machine without a usable browser callback, OpenAI documents device-code login:

codex login --device-auth

Enable device-code login in your personal security settings or through the workspace administrator first. Open the displayed link in a browser and enter the one-time code. OpenAI labels this authentication route beta. Source: headless authentication.

The IDE extension option

If you want the conversation beside your source files, OpenAI documents a Codex extension for VS Code and compatible editors, including Cursor and Windsurf. Follow the installation link from the official IDE guide, sign in, and open a project.

If the icon is missing, that guide documents the Command Palette action Codex: Open Codex Sidebar. Open files and selections can provide prompt context, and you can inspect edits beside the code. Choose this route when that layout suits your work; it is a separate option from the desktop package. Source: editor setup and context.

Two recordings: official versus unofficial

In Codex on Linux: Official Desktop App Setup, I recorded the official app installation and a first project audit. The watch page is titled “ChatGPT and Codex on Linux.” Use the current vendor instructions alongside it rather than copying every package choice from the recording.

My earlier Codex Desktop on Linux video records an unofficial setup. Its watch page explicitly labels it “the unofficial setup recording.” Treat that video as historical context. It does not establish current OpenAI support, ongoing wrapper maintenance, or feature parity. For a new installation, start with the official sources above.

Common errors: identify the failing step

The install fails before the app opens

Save the full package-manager output and check the package name, architecture, and distribution against the official installation page. Do not turn one missing-dependency message into a generic list of packages to install on every machine. Diagnose the dependency named in your own error.

The browser login does not return to the CLI

OpenAI identifies remote environments and blocked localhost callbacks as reasons browser login may fail. Try the documented device-code route above. For further diagnosis, direct codex login runs write a dedicated codex-login.log under the configured log directory. Source: login diagnostics.

You hit a usage or account message

Read the exact message before reinstalling. Installation, authentication, and allowance are separate checks. Consult OpenAI’s plan-access guide for the account side. Keep error reports specific: client, installation method, system, action attempted, and observed result. Remove credentials before sharing logs.

Finish with one small project task

Once the client opens, resist starting with “improve everything.” Ask for a project explanation with file references. Read those files yourself, then choose a single change with a visible result. A useful brief states the problem, the allowed files, what must stay the same, and the command or manual check that will show whether the change worked.

For practice, follow the Codex workflow guide. Compare the diff with the brief and run the project’s checks before accepting the result. The Claude Code vs Codex guide covers Mike’s task-routing setup. A successful installation is only the starting point; a reviewed, verified change is the useful outcome.

FAQ

Is Codex desktop Linux official now?

Yes. OpenAI’s August 11, 2026 changelog announced the Linux desktop preview with Codex. Use the official Linux installation page for current compatibility.

Do I need an API key to start?

No. Launch Codex and choose Sign in with ChatGPT. OpenAI’s account guide describes access through ChatGPT plans, with usage limits that vary by plan.

Which CLI installation should I choose?

Choose one installation method and record it. The OpenAI README documents npm and downloadable Linux binaries; the CLI quickstart also provides a standalone installer.

Is the earlier community desktop setup still required?

Start a new installation from OpenAI’s current documentation. Mike’s earlier unofficial wrapper recording is historical context, not the official installation procedure.

What if browser sign-in fails on a remote machine?

OpenAI documents device-code authentication for headless environments or blocked localhost callbacks. Enable it in account security settings or through your workspace administrator, then run codex login --device-auth.

Sources

Product facts checked as of October 23, 2026. Some developers.openai.com links redirect to the current ChatGPT Learn documentation. Recordings provide historical context; the official pages establish current product details.