Run a command in a running container

nixos-container

  • Starts NixOS containers using Linux containers.
    More information: <https://nixos.org/manual/nixos/stable/#ch-containers>.
  • Trick copyright: tl;dr; <https://github.com/tldr-pages/tldr>

sudo nixos-container run {{container_name}} -- {{command}} {{command_arguments}}

click the source code to copy