# Download and install

## Which one to install

| You want to | Install this |
| --- | --- |
| Chat and write, and also write code with Codex | **The ChatGPT desktop app**. It comes with Codex. Most people choose this |
| Not install anything | The web version. Open [chatgpt.com](https://chatgpt.com) and start using it |
| Use it on your phone | The ChatGPT mobile app |
| Write code in VS Code or Cursor | The Codex IDE extension |
| Type commands in a terminal | The Codex CLI |

If you only use 2api balance: a 2api key is for writing code with Codex. ChatGPT chat still needs a ChatGPT account. After you install Codex, set up 2api in one click with [magpie](https://docs.2api.dev/en/magpie/).

## Desktop app

The desktop app has both ChatGPT and Codex. Switch between them from the dropdown menu in the top-left corner.

Open [chatgpt.com/download](https://chatgpt.com/download/), download the macOS version and drag ChatGPT into Applications. You can also download it directly: [Apple silicon](https://persistent.oaistatic.com/codex-app-prod/Codex.dmg), [Intel](https://persistent.oaistatic.com/codex-app-prod/Codex-latest-x64.dmg).
  Install [ChatGPT](https://apps.microsoft.com/detail/9plm9xgg6vks) from the Microsoft Store, or run this in PowerShell:

  ```powershell
  winget install --id 9PLM9XGG6VKS -s msstore
  ```

  The store also has ChatGPT Classic. That is the old version, and it doesn't have Codex. Windows 11 is recommended. Windows 10 needs version 1809 or later.
  The Linux version is still in preview. It supports Ubuntu 24.04 / 26.04, Debian 13, Fedora 43 / 44 and Arch Linux, on both x64 and ARM64. First run `uname -m` to check the processor architecture: `x86_64` means x64, and `aarch64` or `arm64` means ARM64.

  On Ubuntu / Debian, download the [x64 .deb](https://persistent.oaistatic.com/codex-app-prod/linux/deb/latest/chatgpt_amd64.deb) or the [ARM64 .deb](https://persistent.oaistatic.com/codex-app-prod/linux/deb/latest/chatgpt_arm64.deb), then run:

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

  On Fedora, download the [x64 .rpm](https://persistent.oaistatic.com/codex-app-prod/linux/rpm/latest/chatgpt.x86_64.rpm) or the [ARM64 .rpm](https://persistent.oaistatic.com/codex-app-prod/linux/rpm/latest/chatgpt.aarch64.rpm), then run:

  ```bash
  cd ~/Downloads
  sudo dnf install ./chatgpt.x86_64.rpm
  ```

  For ARM64, replace the file name with the one you downloaded. For Arch Linux and more details, see the official [Linux installation guide](https://learn.chatgpt.com/docs/linux/linux-app).
  **Check that it's installed**: Open ChatGPT and click **Continue to sign in** to sign in (see [Sign in](https://docs.2api.dev/en/guides/login/)). Then choose **Codex** from the dropdown menu in the top-left corner. If you see a new Codex conversation page, you're done. If you installed the Codex desktop app before, it becomes the ChatGPT desktop app after an update. Open it, then switch to Codex.

## Web and mobile

- **Web**: Open [chatgpt.com](https://chatgpt.com). It works in browsers on both computers and phones. Codex is at [chatgpt.com/codex](https://chatgpt.com/codex/).
- **iPhone / iPad**: ChatGPT in the App Store. The developer is OpenAI OpCo, LLC, and it needs iOS 18 or later. The app isn't available in the App Store in mainland China, Hong Kong or Macau. You can use the web version for now: open chatgpt.com in Safari, then tap **Share** → **Add to Home Screen**.
- **Android**: [ChatGPT](https://play.google.com/store/apps/details?id=com.openai.chatgpt) on Google Play. The developer is OpenAI, and it needs Android 7.1 or later and Google Play services. OpenAI doesn't offer the installer anywhere else. APKs on third-party sites may be fakes.

## IDE extension (VS Code, Cursor)

1. Search for **Codex** in your editor's extension marketplace. Pick the one whose publisher is OpenAI and whose extension ID is `openai.chatgpt`. There are quite a few look-alike extensions with similar names. You can also open the [VS Code extension page](https://marketplace.visualstudio.com/items?itemName=openai.chatgpt) directly. VS Code, Cursor and Windsurf all use this extension.

2. After installing, click the Codex icon in the sidebar. If you can't find the icon, press `Ctrl+Shift+P` (`Cmd+Shift+P` on macOS) to open the Command Palette and run **Codex: Open Codex Sidebar**. Cursor's activity bar is horizontal, so the new icon may be hidden under **More**. Drag it out and pin it.

3. Sign in. If you use a ChatGPT subscription, click **Sign in with ChatGPT**. If you use 2api balance, turn on Connect (接入) for Codex in [magpie](https://docs.2api.dev/en/magpie/). The extension uses the same settings.

4. Open a project and send "Give me an overview of this project" to try it. If it replies normally, it's installed.

In JetBrains IDEs, choose Codex in AI Chat. In Xcode, choose Codex when you start a new conversation in the coding assistant.

:::caution[On Windows, the extension is installed but nothing happens]
You may be missing C++ components. Install Visual Studio Build Tools (with the C++ workload) and the Visual C++ Redistributable (x64), then fully quit the editor and open it again:

```powershell
winget install --id Microsoft.VisualStudio.2022.BuildTools -e
```
:::

## CLI

You only need this if you're used to typing commands in a terminal. If you don't use a terminal, skip this section. Run the command for your system in a terminal (on Windows, use PowerShell, not CMD):

```bash
  curl -fsSL https://chatgpt.com/codex/install.sh | sh
  ```
  ```powershell
  powershell -ExecutionPolicy ByPass -c "irm https://chatgpt.com/codex/install.ps1 | iex"
  ```
  ```bash
  curl -fsSL https://chatgpt.com/codex/install.sh | sh
  ```

  On Linux, Codex uses bubblewrap as its sandbox. If it isn't installed, install it first: on Ubuntu / Debian run `sudo apt install bubblewrap`, and on Fedora run `sudo dnf install bubblewrap`.
  After installing, close the terminal, open a new one and run `codex --version`. If you see a version number, it's installed. To update later, run `codex update`.

If it won't install or says the command isn't found, see the [CLI section of the FAQ](https://docs.2api.dev/en/faq/chatgpt/#cli). For WSL2, the sandbox, garbled Chinese text and other Windows settings, see [Using Codex on Windows](https://docs.2api.dev/en/faq/codex-windows/).

## Regions

ChatGPT is only available in the countries and territories that OpenAI supports. For the list, see [Supported countries and territories](https://help.openai.com/en/articles/7947663-chatgpt-supported-countries) in the OpenAI Help Center. According to OpenAI, using it in an unsupported region may get your account restricted or deactivated.

## Next steps

- To sign in: [Sign in](https://docs.2api.dev/en/guides/login/)
- To use 2api balance: [Set up every agent with magpie](https://docs.2api.dev/en/magpie/)
- To start using it: [Using ChatGPT and Codex](https://docs.2api.dev/en/guides/usage/)

---

This page follows OpenAI's official documentation, checked in October 2026. OpenAI updates often, so button names and menu locations may differ slightly. Go by what you see on screen.