AI / GitHub Copilot CLI Fundamentals Interview Questions
What are the key differences when using Copilot CLI on macOS vs Linux?
Copilot CLI runs on both macOS and Linux with near-identical behaviour - the differences are primarily in installation methods, credential storage, and system integration rather than core features.
| Aspect | macOS | Linux |
|---|---|---|
| Install (recommended) | npm install -g @github/copilot OR brew install (check docs) | npm install -g @github/copilot OR install script |
| Install script default dir | Uses PREFIX or /usr/local/bin | Uses PREFIX or /usr/local/bin |
| Credential store | macOS Keychain (most secure) | libsecret / GNOME Keyring / KWallet (if available) |
| Fallback credential | ~/.copilot/ plain text | ~/.copilot/ plain text (common in servers/containers) |
| Package manager option | Homebrew (brew) | apt/dnf/pacman (no official package - use npm) |
| Containerised use | Uncommon | Common - Docker, GitHub Actions runners |
# macOS: Homebrew installation (if available) brew install gh-copilot # check docs for current formula # Linux: npm installation npm install -g @github/copilot # Linux server (headless): use token auth export COPILOT_GITHUB_TOKEN=github_pat_xxx copilot -p "Summarise the git log from the last week" -s # Linux container: install script non-root curl -fsSL .../install.sh | PREFIX=$HOME/.local bash export PATH="$HOME/.local/bin:$PATH" copilot --version
On Linux servers and CI environments (headless, no UI, no keychain), plain text credential storage to ~/.copilot/ or COPILOT_HOME is the default fallback. Always use environment variable authentication in these environments rather than the interactive login flow.
More Related questions...