Codex on Linux with multiple accounts
Keep several OpenAI accounts on one Linux machine and select which one the Codex CLI uses next. The CodexUse desktop app now ships for Linux, and the CodexUse CLI covers the shells, SSH sessions, and headless boxes where a window manager is not an option.
linux-x64-CodexUse-Setup.tar.gz or linux-arm64-CodexUse-Setup.tar.gz. It manages
unlimited accounts, ChatGPT Web accounts, custom-model accounts, Account Pool, headroom and refill timers, and Cloud Sync.
One Codex window per account, Auto-roll and Telegram drive the official Codex app, which OpenAI ships
for macOS only, so those three stay unavailable here. See platform support.Install the desktop app on Linux
- Run
uname -m.x86_64takes the x64 package;aarch64takes the arm64 package. - Install GTK and WebKitGTK 4.1 from your distribution. The app renders in WebKitGTK, and the installer checks for it.
- Unpack the
.tar.gzand run the installer script inside it. - Accounts, settings, and local history live in
$XDG_CONFIG_HOME/codexuse-desktop, or~/.config/codexuse-desktop. - Other distributions may work, but Ubuntu 24.04 is the one the release is tested on. Check your GTK and WebKitGTK packages first.
Why this is a problem
- The native Codex CLI keeps one active login at a time.
- Linux workflows mix local terminals, SSH sessions, and multiple client contexts in the same day.
- When a rate limit lands, you need a clean way to move to another account without running the whole login loop again.
The fix
CLI-only steps
- Add each account once with a clear name.
- Use device auth when you are on SSH or a headless Linux box.
- Select the account before the next long Codex turn, then start a fresh shell or session.
CodexUse CLI path
- The CodexUse CLI keeps account selection one command away in tmux, SSH, or a remote box.
- It is the same workflow whether you are local or three SSH hops deep.
- Already set up your accounts on another machine? Pull them onto Linux with cloud sync during an active trial or with Pro.
codexuse profile add Work --login=device
codexuse profile add Personal --login=device
codexuse profile list --compact
codexuse profile switch Work
codexuse profile autoroll --dry-run
Use --login=browser on a normal desktop Linux session if you prefer the browser flow.
Cross-device setup transfer is where Linux gets better
If your main setup lives on a MacBook or another Linux box, push from there and pull onto the Linux machine that is about to do the work.
Prevent it next time
- Name accounts by role, for example
work,client-acme, orpersonal. - Keep one lower-usage reserve account ready for when the primary account is close to a 429.
- Use
profile autorollor a manual preflight before big jobs instead of waiting for interruption.
Troubleshooting table
| Symptom | Likely cause | Action |
|---|---|---|
| Selected another account but the next command still feels tied to the old one | The shell or Codex turn started before the selection | Open a fresh shell or start the next session after selecting the account |
| You get a duplicate-account warning | Two account names point at the same OpenAI account | Merge or rename them so the local account list matches reality |
| You are on SSH with no browser access | The auth flow is mismatched to the environment | Use device auth and stay in the CLI path |
What to avoid
- Using the same OpenAI account under multiple account names to fake more capacity.
- Starting a long run before you confirm which account is active.
- Assuming an already-running session will inherit a new account selection mid-turn.
Related
Can I run CodexUse on Linux?
Yes. The desktop app ships for Ubuntu 24.04 on x64 and arm64 and needs GTK with WebKitGTK 4.1. It manages your accounts, custom-model accounts, ChatGPT Web accounts, Account Pool, headroom and Cloud Sync. One Codex window per account, Auto-roll and Telegram need the official Codex app on macOS. On SSH or a headless box, use the CodexUse CLI instead.
Why would I need multiple accounts on Linux?
Linux workflows mix client, work, and personal terminals. Separate accounts keep that work distinct and let you select the right one before a long run or a 429.
Does selecting an account apply to the current session instantly?
Select the account first, then start the next Codex session or open a fresh shell. An already-running turn will not inherit the new active account.