LinuxCommandLibrary
GitHubF-DroidGoogle Play Store

nix3-shell

Start a shell providing specific packages

TLDR

Enter a shell with a package available
$ nix shell nixpkgs#[hello]
copy
Enter a shell with multiple packages
$ nix shell nixpkgs#[git] nixpkgs#[curl]
copy
Run a single command with a package and exit
$ nix shell nixpkgs#[jq] --command jq --version
copy
Enter a shell with a package from a specific flake
$ nix shell github:[owner/repo]#[package]
copy
Enter a shell with a package from a specific nixpkgs revision
$ nix shell github:NixOS/nixpkgs/[nixos-24.05]#[hello]
copy

SYNOPSIS

nix shell [options] installables

DESCRIPTION

nix shell starts a shell environment with the specified packages available in `$PATH`. It is the flake-based replacement for `nix-shell -p` and does not require a shell.nix or default.nix file.Packages are specified as flake references (e.g., `nixpkgs#jq`). The packages are built or fetched as needed and made available only in the spawned shell session. Nothing is permanently installed.

PARAMETERS

INSTALLABLES

Flake references specifying packages to make available (e.g., nixpkgs#hello).
--command, -c CMD [ARGS]
Run a command in the shell environment instead of starting an interactive shell.
--ignore-environment, -i
Clear the entire environment (except those specified with --keep).
--keep NAME
Keep the specified environment variable when using --ignore-environment.
--keep-going
Continue building other derivations if one fails.
--impure
Allow access to mutable paths and environment variables.
--override-input INPUT FLAKEREF
Override a specific flake input. Implies --no-write-lock-file.
--help
Display help information.

CAVEATS

Requires the experimental `nix-command` and `flakes` features to be enabled. Packages are not permanently installed; they are only available in the spawned shell session.

SEE ALSO

Braincup
Open source brain training for math, memory and focus
Braincup mini-games
41 mini-games · Apache-2.0
No ads · No tracking
Play in browser
Download Braincup on the App StoreGet Braincup on Google PlayGet Braincup on F-Droid
276 stars
From the maker of Linux Command Library
Copied to clipboard
Braincup
Open source brain training for math, memory and focus. 41 mini-games, from mental arithmetic to Sudoku, N-Back and Solo Chess.
Apache-2.0 licensed · No ads · No tracking · No account
From the maker of Linux Command Library
Download Braincup on the App StoreGet Braincup on Google PlayGet Braincup on F-Droid