Codex on Linux with multiple profiles
If your Codex work lives in Linux terminals, you can still run multiple OpenAI accounts and switch between them cleanly. This is a CLI workflow note: the CodexUse desktop app is macOS only, but the profile-switching workflow below is built for Linux shells, SSH, and headless boxes.
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.
- Switch before the next long Codex turn, then start a fresh shell or session.
CodexUse CLI path
- The CodexUse CLI keeps profile switching 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 handoff 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 profiles by role, for example
work,client-acme, orpersonal. - Keep one lower-usage reserve profile 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 |
|---|---|---|
| Switched profiles but the next command still feels tied to the old account | The shell or Codex turn started before the switch | Open a fresh shell or start the next session after switching |
| You get a duplicate-account warning | Two profile names point at the same OpenAI account | Merge or rename them so the local profile 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 profile names just to fake more capacity.
- Starting a long run before you confirm which profile is active.
- Assuming an already-running session will inherit a new profile switch mid-turn.
Related
Can I run CodexUse on Linux?
The CodexUse desktop app is macOS (Apple Silicon) only. On Linux, you use the Codex CLI together with the CodexUse CLI, which handles profile switching well in terminal-heavy and SSH-heavy workflows.
Why would I need multiple profiles on Linux?
Linux workflows mix client, work, and personal terminals. Separate profiles keep those accounts distinct and let you switch before a long run or a 429.
Does a profile switch apply to the current session instantly?
Switch first, then start the next Codex session or open a fresh shell. An already-running turn will not inherit the new active profile.