2020-07-22 07:51:11 -04:00
# Quick Start
2023-11-30 18:41:19 -05:00
This chapter is for impatient people who don't like reading documentation.
For more in-depth information you are kindly referred to subsequent chapters.
2020-07-22 07:51:11 -04:00
2023-11-30 18:41:19 -05:00
1. Install Nix:
2020-07-22 07:51:11 -04:00
2020-07-31 09:43:25 -04:00
```console
2023-02-07 17:32:27 -05:00
$ curl -L https://nixos.org/nix/install | sh
2020-07-31 09:43:25 -04:00
```
2020-07-22 07:51:11 -04:00
2023-01-16 14:35:12 -05:00
The install script will use `sudo` , so make sure you have sufficient rights.
2023-11-30 18:41:19 -05:00
For other installation methods, see the detailed [installation instructions ](installation/index.md ).
2020-07-22 07:51:11 -04:00
2023-11-30 18:41:19 -05:00
1. Run software without installing it permanently:
2020-07-22 07:51:11 -04:00
2020-07-31 09:43:25 -04:00
```console
2023-11-30 18:41:19 -05:00
$ nix-shell --packages cowsay lolcat
2020-07-31 09:43:25 -04:00
```
2020-07-22 07:51:11 -04:00
2023-11-30 18:41:19 -05:00
This 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:
2020-07-22 07:51:11 -04:00
2020-07-31 09:43:25 -04:00
```console
2023-11-30 18:41:19 -05:00
[nix-shell:~]$ cowsay Hello, Nix! | lolcat
2020-07-31 09:43:25 -04:00
```
2020-07-22 07:51:11 -04:00
2023-11-30 18:41:19 -05:00
Exiting the shell will make the programs disappear again:
2020-07-22 07:51:11 -04:00
2020-07-31 09:43:25 -04:00
```console
[nix-shell:~]$ exit
2023-11-30 18:41:19 -05:00
$ lolcat
lolcat: command not found
2020-07-31 09:43:25 -04:00
```
2020-07-22 07:51:11 -04:00
2023-11-30 18:41:19 -05:00
1. Search for more packages on < search.nixos.org > to try them out.
2020-07-22 07:51:11 -04:00
2023-11-30 18:41:19 -05:00
1. Free up storage space:
2020-07-22 07:51:11 -04:00
2020-07-31 09:43:25 -04:00
```console
2023-11-30 18:41:19 -05:00
$ nix-collect-garbage
2020-07-31 09:43:25 -04:00
```