2020-07-22 14:51:11 +03:00
# Quick Start
2023-12-01 01:41:19 +02: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 14:51:11 +03:00
2023-12-01 01:41:19 +02:00
1. Install Nix:
2020-07-22 14:51:11 +03:00
2020-07-31 16:43:25 +03:00
```console
2023-02-08 00:32:27 +02:00
$ curl -L https://nixos.org/nix/install | sh
2020-07-31 16:43:25 +03:00
```
2020-07-22 14:51:11 +03:00
2023-01-16 21:35:12 +02:00
The install script will use `sudo` , so make sure you have sufficient rights.
2023-12-01 01:41:19 +02:00
For other installation methods, see the detailed [installation instructions ](installation/index.md ).
2020-07-22 14:51:11 +03:00
2023-12-01 01:41:19 +02:00
1. Run software without installing it permanently:
2020-07-22 14:51:11 +03:00
2020-07-31 16:43:25 +03:00
```console
2023-12-01 01:41:19 +02:00
$ nix-shell --packages cowsay lolcat
2020-07-31 16:43:25 +03:00
```
2020-07-22 14:51:11 +03:00
2023-12-01 01:41:19 +02: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 14:51:11 +03:00
2020-07-31 16:43:25 +03:00
```console
2023-12-01 01:41:19 +02:00
[nix-shell:~]$ cowsay Hello, Nix! | lolcat
2020-07-31 16:43:25 +03:00
```
2020-07-22 14:51:11 +03:00
2023-12-01 01:41:19 +02:00
Exiting the shell will make the programs disappear again:
2020-07-22 14:51:11 +03:00
2020-07-31 16:43:25 +03:00
```console
[nix-shell:~]$ exit
2023-12-01 01:41:19 +02:00
$ lolcat
lolcat: command not found
2020-07-31 16:43:25 +03:00
```
2020-07-22 14:51:11 +03:00
2024-03-06 23:55:02 +02:00
1. Search for more packages on [search.nixos.org ](https://search.nixos.org/ ) to try them out.
2020-07-22 14:51:11 +03:00
2023-12-01 01:41:19 +02:00
1. Free up storage space:
2020-07-22 14:51:11 +03:00
2020-07-31 16:43:25 +03:00
```console
2023-12-01 01:41:19 +02:00
$ nix-collect-garbage
2020-07-31 16:43:25 +03:00
```