Skip to main content
Start an interactive shell in a pixi environment. Run exit to leave the shell.

Usage

Alias: pixi s

Options

path
The path to the pixi.toml or pyproject.toml file.
boolean
Install the environment as defined in the lockfile, without updating it.
boolean
Check if the lockfile is up-to-date before installing the environment. Errors if the lockfile is out-of-date.
string
The environment to activate in the shell.
boolean
Don’t install the environment, only activate it.
boolean
default:"true"
Change the prompt to indicate the pixi environment (can be configured in the global config).

Examples

Start a shell in the default environment

Start a shell in a specific environment

Start a shell without updating the environment

Supported Shells

Pixi automatically detects and supports the following shells:

Unix/Linux/macOS

  • Bash - Default on most Linux systems
  • Zsh - Default on macOS
  • Fish
  • Xonsh
  • Nushell

Windows

  • PowerShell - Default
  • Cmd.exe
  • Bash (Git Bash, WSL)
  • Nushell
Pixi will use the shell from which it was invoked, or fall back to the system default shell.

Shell Prompt

By default, pixi modifies your shell prompt to indicate you’re in a pixi environment:
You can disable this behavior:
  • Globally: Configure change-ps1 = false in your pixi configuration
  • Per command: Currently not configurable per-command, but you can use pixi shell-hook for custom integrations

Shell Completions

If configured (source-completion-scripts = true in config), pixi will automatically source shell completions from the activated environment for supported shells.

Interactive Workflow

You can use pixi s as a shorthand for pixi shell.

Environment Activation

When you start a shell:
  1. Pixi checks if the lockfile is up-to-date (unless --frozen is used)
  2. Installs the environment if needed (unless --no-install is used)
  3. Activates the environment with all necessary environment variables
  4. Starts an interactive shell
  5. Modifies the prompt (unless disabled)

Differences from pixi run

  • pixi shell starts an interactive shell session
  • pixi run executes a single command and exits
  • Both activate the same environment with the same variables

Using with Different Shells

Pixi adapts to your shell automatically: