# nix 编辑 > 在 $EDITOR 中打开 Nix 包的 Nix 表达式。 > 更多信息:。 - 在你的 `$EDITOR` 中打开来自 nixpkgs 的包的 Nix 表达式源代码: `nix edit {{nixpkgs#pkg}}` - 将包的源代码转储到 `stdout`: `EDITOR=cat nix edit {{nixpkgs#pkg}}`