File: quick-start.md

package info (click to toggle)
nix 2.26.3%2Bdfsg-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 12,524 kB
  • sloc: cpp: 87,540; sh: 8,864; perl: 649; yacc: 466; xml: 410; javascript: 378; lex: 329; ansic: 215; python: 128; sql: 56; makefile: 33; exp: 5; ruby: 1
file content (43 lines) | stat: -rw-r--r-- 1,151 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
# 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.

1. Install Nix:

   ```console
   $ curl -L https://nixos.org/nix/install | sh
   ```

   The install script will use `sudo`, so make sure you have sufficient rights.

   For other installation methods, see the detailed [installation instructions](installation/index.md).

1. Run software without installing it permanently:

   ```console
   $ nix-shell --packages cowsay lolcat
   ```

   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:

   ```console
   [nix-shell:~]$ cowsay Hello, Nix! | lolcat
   ```

   Exiting the shell will make the programs disappear again:

   ```console
   [nix-shell:~]$ exit
   $ lolcat
   lolcat: command not found
   ```

1. Search for more packages on [search.nixos.org](https://search.nixos.org/) to try them out.

1. Free up storage space:

   ```console
   $ nix-collect-garbage
   ```