Home Explore Blog Models CI



nix

doc/manual/source/command-ref/nix-env/switch-profile.md
b4b5b99cf6a3aaeeee4a734b4b9dc3d275e45be742d81b5700000003000001d3
# Name

`nix-env --switch-profile` - set user environment to given profile

# Synopsis

`nix-env` {`--switch-profile` | `-S`} *path*

# Description

This operation makes *path* the current profile for the user. That is,
the symlink `~/.nix-profile` is made to point to *path*.

{{#include ./opt-common.md}}

{{#include ../opt-common.md}}

{{#include ./env-common.md}}

{{#include ../env-common.md}}

# Examples

```console
$ nix-env --switch-profile ~/my-profile
```

Chunks
e4a6be4a (1st chunk of `doc/manual/source/command-ref/nix-env/switch-profile.md`)
Title: nix-env --switch-profile: Set User Environment Profile
Summary
This chunk describes the `nix-env --switch-profile` command (or `-S`), which allows a user to change their current Nix environment profile. The command takes a `path` as an argument and updates the `~/.nix-profile` symlink to point to the specified path, effectively setting the user's active profile. An example `nix-env --switch-profile ~/my-profile` illustrates its usage.