this focuses on `nix-shell -p` and refers to search.nixos.org for package search, which is currently the easiest and most effective way to find program names.
1.2 KiB
Quick Start
This chapter is for impatient people who don't like reading documentation. For more in-depth information you are kindly referred to subsequent chapters.
-
Install Nix:
$ curl -L https://nixos.org/nix/install | shThe install script will use
sudo, so make sure you have sufficient rights. On Linux,--daemoncan be omitted for a single-user install.For other installation methods, see the detailed installation instructions.
-
Run software without installing it permanently:
$ nix-shell --packages cowsay lolcatThis downloads the specified packages with all their dependencies, and drops you into a Bash shell where the commands provided by those packages are present. This will not affect your normal environment:
[nix-shell:~]$ cowsay Hello, Nix! | lolcatExiting the shell will make the programs disappear again:
[nix-shell:~]$ exit $ lolcat lolcat: command not found -
Search for more packages on <search.nixos.org> to try them out.
-
Free up storage space:
$ nix-collect-garbage