Skip to content

nagent commands ​

nagent controls the agent on a managed machine running Linux, Windows or macOS. The table lists its subcommands in the order nagent --help prints them.

Privileges ​

A subcommand needs root on Linux and macOS, or an administrator terminal on Windows; without it, the subcommand prints the line to run and exits with status 2. --version, -h, nagent answer and nagent step-down run under any account.

Subcommands ​

Asks marks a subcommand that asks one [y/N] question first. --yes answers it, and a no prints nothing changed and exits with status 1. Without a terminal and without --yes, the answer is no.

CommandArguments and flagsAsksWhat it does
nagent join <link>the neutrino://enroll/ link from the hub's Devices page, else a prompt; --yeswhen already boundJoins the hub the link names and starts the agent's service when it is stopped.
nagent leave--yesyesLeaves the hub and removes the binding; the service keeps running. On an unbound machine it exits with status 1.
nagent statusnoPrints the version, the bound hub, the last address, the service's state, and whether the hub accepted the last hello. Exits with 0 when bound and accepted.
nagent syncnoSends this machine's report to the hub now. Exits with status 1 when the service is stopped.
nagent start--yesyesStarts the agent's service and prints its state.
nagent stop--yesyesStops the agent's service until the next boot; the binding is kept.
nagent runnoRuns the agent in the foreground, as the systemd unit and the macOS LaunchDaemon do.
nagent service runnoRuns the agent as the Windows service; from a terminal it exits with status 1.
nagent service uninstall--yesyesStops the agent and removes what its modules added; shares, accounts and data stay. Uninstall has the rest.
nagent answer--prompt <text>, --answer <keys>, -- then the programnoRuns a program on its own pseudo console and types the answer at the prompt. The agent runs it on Windows; nobody runs it by hand.
nagent step-down--uid <uid>, --gid <gid>, -- then the program by full pathnoDrops to that account and runs the program. The agent runs it on macOS; nobody runs it by hand. Exits with 126 on failure.

Global flags ​

FlagWhereWhat it does
--versionnagentPrints the package version and exits.
-hevery levelPrints that level's help and exits.

nagent with no subcommand and nagent service with no action print their help and exit with status 2. nagent answer and nagent step-down with no program also exit with status 2.

Neutrino · personal developer infrastructure