NuttShell (NSH)
The NuttShell is a very complete shell system to be used in NuttX, similar to bash and other similar options. It supports a rich set of included commands, scripting and the ability to run your own applications as “builtin” (part of the same NuttX binary). NSH is implemented as an application where most of the functionality is part of the library called nshlib.
As such, NSH is completely optional and can be disabled so that NuttX directly
starts a given task instead of the main nsh application.
Contents
- Overview
- Commands
testEvaluate ExpressionaddrouteAdd a Routing Table EntryarpAccess the ARP tablebase64decBase64 Decodebase64encBase64 EncodebasenameExtract Base File/Directory NamebreakTerminate a LoopcatConcatenate FilescdChange Current Working DirectorycmpCompare FilescpCopy FilesdateShow or set the date and timeddCopy and Convert FilesdelrouteDelete a Routing Table EntrydfShow Volume StatusdirnameExtract Path to a File/DirectorydmesgDump Buffered SYSLOG OutputechoEcho Strings and VariablesenvShow Environment VariablesexecExecute User CodeexitExit NSHexportSet an Environment VariableexprEvaluate expressionsfreeShow Memory Manager StatusgetGet File Via TFTPhelpShow Usage Command UsagehexdumpHexadecimal Dump of File or DeviceifconfigManage Network ConfigurationifdownTake a network downifupBring a network upinsmodInstall an OS moduleirqinfoShow Interrupt StatuscritmonShow Critical Monitor StatuskillSend a signal to a tasklosetupSetup/teardown the Loop DevicelnLink to a File or DirectorylsList Directory ContentslsmodShow information about installed OS modulesmd5Calculate MD5mb,mh,andmwAccess MemorypsShow Current Tasks and ThreadsmkdirCreate a DirectorymkfatfsCreate a FAT File SystemmkfifoCreate a FIFOmkrdCreate a RAMDISKmountMount a File SystemmvRename a FilenfsmountMount an NFS file systemnslookupLookup a network addresspasswdChange a User’s PasswordpmconfigManage Power Management SubsystempoweroffShut the system downputSend File Via TFTPpwdShow Current Working DirectoryreadlinkShow target of a linkrebootReboot the systemrmRemove a FilermdirRemove a DirectoryrmmodRemove on OS ModulerouteShow routing tablerptunStart/Stop the OpenAMP RPC TunnelsetSet a VariableshExecute an NSH ScriptshutdownShut the system downsleepWait for SecondstelnetdTime Start the Telnet DaemontimeTime execution of another commandtruncateSet the Size of a FileumountUnmount a File SystemunamePrint system informationunsetUnset an Environment VariableuptimeShow how long the system has been runningurldecodeURL DecodeurlencodeURL EncodeuseraddAdd a New UseruserdelDelete a userusleepWait for MicrosecondswgetGet File Via HTTPxdHexadecimal Dump of Memory- Built-In Commands
pingandping6Check Network Peer
- Configuration Settings
- The NSH Library and NSH Initialization
- NSH Commands
- NSH “Built-In” Applications
- Customizing NSH Initialization
- Shell Login
- Running Applications from NSH