exit to leave the shell.
Usage
pixi s
Options
The path to the
pixi.toml or pyproject.toml file.Install the environment as defined in the lockfile, without updating it.
Check if the lockfile is up-to-date before installing the environment. Errors if the lockfile is out-of-date.
The environment to activate in the shell.
Don’t install the environment, only activate it.
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:- Globally: Configure
change-ps1 = falsein your pixi configuration - Per command: Currently not configurable per-command, but you can use
pixi shell-hookfor 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
Environment Activation
When you start a shell:- Pixi checks if the lockfile is up-to-date (unless
--frozenis used) - Installs the environment if needed (unless
--no-installis used) - Activates the environment with all necessary environment variables
- Starts an interactive shell
- Modifies the prompt (unless disabled)
Differences from pixi run
pixi shellstarts an interactive shell sessionpixi runexecutes a single command and exits- Both activate the same environment with the same variables