Requirements
nerves_hub_link2.10.0 or later.- NervesHub 2.3.0 or later.
- The
exptylibrary in your firmware.
Enable it on a Nerves device
For the Linux agent, turn on[extensions.local_shell] in the agent’s config instead. See Linux agent. The product and device settings below apply to both.
1
Add ExPTY to your dependencies
nerves_hub_link lists expty as an optional dependency. Without it, the extension cannot start a shell.2
Check your extension list
When
ExPTY is available, NervesHubLink.Extensions.LocalShell is in the default extension_modules list and you have nothing to configure.If you set extension_modules yourself, that list replaces the default, so name the module in it:3
Turn it on for the product
In Product settings, on the General tab, switch on Local shell in the Device extensions card. A product created in the web UI starts with every extension on. A product created through the API or
nh starts with every extension off.4
Check the device setting
On the device’s Settings tab, Local Shell in the Extensions card is on by default.
Check that it works
Reconnect the device if it was connected before you turned the extension on. Open the device and select the System Shell tab. A terminal opens when the device is online and the extension is attached. If the tab says the local shell isn’t currently enabled, check the product and device settings. If it says the shell isn’t currently available, the device has not attached the extension: check that the firmware includesexpty and the module.
How it behaves
- The device runs the program in the
SHELLenvironment variable with-i. IfSHELLis not set, it runssh -i. TERMdefaults toxtermwhen it is not set.- The session is shared. Everyone with the System Shell tab open for a device sees the same shell.
- NervesHub keeps a bounded scrollback for the connection, so someone opening the tab sees recent output.
Who can use it
Opening a local shell needs thedevice:extensions:local_shell permission. It is separate from the device:console permission for the remote console. See Roles.

