← 返回命令列表

Linux command

nix-repl 命令

文本

复制后可按需替换文件名、目录或参数。

常用示例

Start Nix REPL

nix repl

Load nixpkgs

nix repl '<nixpkgs>'

Load flake

nix repl [.#]

Load file

nix repl [file.nix]

说明

nix repl starts interactive Nix shell. Evaluate expressions interactively. The tool provides tab completion. Load packages and explore attributes.

参数

--expr _EXPR_
Evaluate expression first.
--help
Display help information.

FAQ

What is the nix-repl command used for?

nix repl starts interactive Nix shell. Evaluate expressions interactively. The tool provides tab completion. Load packages and explore attributes.

How do I run a basic nix-repl example?

Run `nix repl` in a terminal, then adjust file names, paths, flags, or remote targets for your system.

What does --expr _EXPR_ do in nix-repl?

Evaluate expression first.