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.
- Overview
- Commands
- Evaluate Expression (test)
- Add a Routing Table Entry (addroute)
- Access the ARP table (arp)
- Base64 Decode (base64dec)
- Base64 Encode (base64enc)
- Extract Base File/Directory Name (basename)
- Terminate a Loop (break)
- Concatenate Files (cat)
- Change Current Working Directory (cd)
- Compare Files (cmp)
- Copy Files (cp)
- Show or set the date and time (date)
- Copy and Convert Files (dd)
- Delete a Routing Table Entry (delroute)
- Show Volume Status (df)
- Extract Path to a File/Directory (dirname)
- Dump Buffered SYSLOG Output (dmesg)
- Echo Strings and Variables (echo)
- Show Environment Variables (env)
- Execute User Code (exec)
- Exit NSH (exit)
- Set an Environment Variable (export)
- Show Memory Manager Status (free)
- Get File Via TFTP (get)
- Show Usage Command Usage (help)
- Hexadecimal Dump of File or Device (hexdump)
- Manage Network Configuration (ifconfig)
- Take a network down (ifdown)
- Bring a network up (ifup)
- Install an OS module (insmod)
- Show Interrupt Status (irqinfo)
- Show Critical Monitor Status (critmon)
- Send a signal to a task (kill)
- Setup/teardown the Loop Device (losetup)
- Link to a File or Directory (ln)
- List Directory Contents (ls)
- Show information about installed OS modules (lsmod)
- Calculate MD5 (md5)
- Access Memory (mb, mh, and mw)
- Show Current Tasks and Threads (ps)
- Create a Directory (mkdir)
- Create a FAT File System (mkfatfs)
- Create a FIFO (mkfifo)
- Create a RAMDISK (mkrd)
- Mount a File System (mount)
- Rename a File (mv)
- Mount an NFS file system (nfsmount)
- Lookup a network address (nslookup)
- Change a User’s Password (passwd)
- Manage Power Management Subsystem (pmconfig)
- Shut the system down (poweroff)
- Send File Via TFTP (put)
- Show Current Working Directory (pwd)
- Show target of a link (readlink)
- Reboot the system (reboot)
- Remove a File (rm)
- Remove a Directory (rmdir)
- Remove on OS Module (rmmod)
- Show routing table (route)
- Start/Stop the OpenAMP RPC Tunnel (rptun)
- Set a Variable (set)
- Execute an NSH Script (sh)
- Shut the system down (shutdown)
- Wait for Seconds (sleep)
- Time Start the Telnet Daemon (telnetd)
- Time execution of another command (time)
- Set the Size of a File (truncate)
- Unmount a File System (umount)
- Print system information (uname)
- Unset an Environment Variable (unset)
- URL Decode (urldecode)
- URL Encode (urlencode)
- Add a New User (useradd)
- Delete a user (userdel)
- Wait for Microseconds (usleep)
- Get File Via HTTP (wget)
- Hexadecimal Dump of Memory (xd)
- Check Network Peer (ping/ping6)
- Configuration Settings
- Customizing the NuttShell
- NSH “Built-In” Applications
- Customizing NSH Initialization
- Shell Login