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