LinuxCommandLibrary

nix-shell

TLDR

Enter shell with package

$ nix-shell -p [hello]
copy
Enter shell from default.nix
$ nix-shell
copy
Enter shell from file
$ nix-shell [shell.nix]
copy
Run command in shell
$ nix-shell -p [jq] --run "[jq --version]"
copy
Pure shell
$ nix-shell --pure -p [python3]
copy
Multiple packages
$ nix-shell -p [python3] [nodejs] [git]
copy

SYNOPSIS

nix-shell [options] [path]

DESCRIPTION

nix-shell creates temporary development environments. Provides packages without installing.
The tool sets up shell with dependencies. Exits cleanly without system changes.
nix-shell creates dev environments.

PARAMETERS

PATH

Nix expression file.
-p PACKAGES
Packages to include.
--run CMD
Command to execute.
--pure
Clear environment.
-A ATTR
Use specific attribute.
--help
Display help information.

CAVEATS

Legacy command. Consider nix develop. Per-invocation environment.

HISTORY

nix-shell is a core Nix command for creating temporary development shells.

SEE ALSO

nix-develop(1), nix(1), direnv(1)

> TERMINAL_GEAR

Curated for the Linux community

nuphy Air75 V2 Portable 75% Mechanical Keyboard,Wireless Keyboard

nuphy Air75 V2 Portable 75% Mechanical Keyboard,Wireless Keyboard

$129.95
Bmax Mini PC B2 Power Intel 5205U 8GB DDR4 256GB M.2 NVMe SSD ,HDMI 1.4&DP 1.2, USB3.2,4K Dual Display 2.4G/5G WiFi & BT5.0 Mini Desktop Computers /Office/Design

Bmax Mini PC B2 Power Intel 5205U 8GB DDR4 256GB M.2 NVMe SSD ,HDMI 1.4&DP 1.2, USB3.2,4K Dual Display 2.4G/5G WiFi & BT5.0 Mini Desktop Computers /Office/Design

$169.99
New Raspberry Pi 3 Model B+ Board Raspberry PI 3B+

New Raspberry Pi 3 Model B+ Board Raspberry PI 3B+

$54.00
Copied to clipboard

> TERMINAL_GEAR

Curated for the Linux community

GMKtec Gaming PC, K11 AMD Ryzen 9 8945HS, 32GB DDR5 RAM 1TB Mini PC Desktop Computer, Oculink, Dual NIC 2.5GbE LAN, HDMI/DisplayPort/USB4*2

GMKtec Gaming PC, K11 AMD Ryzen 9 8945HS, 32GB DDR5 RAM 1TB Mini PC Desktop Computer, Oculink, Dual NIC 2.5GbE LAN, HDMI/DisplayPort/USB4*2

$739.99
KIWITATA 2X Classic SNES USB Controller for PC Gamings, Retro SNES Wired USB Game Emulator Controller for Windows XP 7 8 11 Mac Raspberry Pi

KIWITATA 2X Classic SNES USB Controller for PC Gamings, Retro SNES Wired USB Game Emulator Controller for Windows XP 7 8 11 Mac Raspberry Pi

$16.99
Raspberry Pi 5 8GB

Raspberry Pi 5 8GB

$134.50