= The Nix REPL The Nix REPL footnote:[REPL is an acronym for (Read-Eval-Print-Loop).] is an interactive environment for evaluating and debugging Nix code. It's also a good place to begin learning Nix. Enter it using the command `nix repl`. Within the REPL, type `:?` to see a list of available commands. [source] .... $ nix repl Welcome to Nix 2.18.1. Type :? for help. nix-repl> :? The following commands are available: Evaluate and print expression = Bind expression to variable :a, :add Add attributes from resulting set to scope :b Build a derivation :bl Build a derivation, creating GC roots in the working directory :e, :edit Open package or function in $EDITOR :i Build derivation, then install result into current profile :l, :load Load Nix expression and add it to scope :lf, :load-flake Load Nix flake and add it to scope :p, :print Evaluate and print expression recursively :q, :quit Exit nix-repl :r, :reload Reload all files :sh Build dependencies of derivation, then start nix-shell :t Describe result of evaluation :u Build derivation, then start nix-shell :doc Show documentation of a builtin function :log Show logs for a derivation :te, :trace-enable [bool] Enable, disable or toggle showing traces for errors :?, :help Brings up this help menu .... A command that is useful to beginners is `:t`, which tells you the type of an expression. Note that the command to exit the REPL is `:q` (or `:quit` if you prefer).