Phoenix Shell (psh)#

The Phoenix Shell is a compact program that enables you to control Phoenix-RTOS from the command line.

psh presents itself with a command line where user can enter commands to control the Phoenix-RTOS system, manage files and processes.



If the psh is in control of the command line each new line starts with (psh)% prompt. The user can then enter the desired command. See Applets for a list of available commands.

If the psh command is run with -h parameter the help message is displayed as follows:

usage: psh [options] [script path] or no args to run shell interactively
  -i <script path>:  selects psh script to execute
  -h: shows this help message

With -i option psh can execute a script - fixed set of psh commands saved in file.


In psh, each command or set of commands is a separate applet. The basic usage of the majority of these applets is compatible with POSIX standards. For example, ls works like the ls user command on Ubuntu (or other Linux distribution), except for particular arguments that are not supported. The Phoenix Shell is in ongoing development, which means its behavior can slightly vary, particularly as new features are introduced. Here’s a list of the available applets:

  • bind - binds device to directory

  • cat - concatenate file(s) to standard output

  • cd- change working directory

  • clear - clear the terminal screen

  • cp- copy file

  • date - print/set the system date

  • dd - copy a file according to the operands

  • df - prints filesystem statistics

  • dmesg - read kernel ring buffer

  • echo - display a line of text

  • edit - text editor

  • exec - replace shell with the given command

  • exit - exits shell

  • export - set and export variables list to environment

  • help - prints this help message

  • history - prints commands history

  • hm - health monitor, spawns apps and keeps them alive

  • ifconfig - configures network interfaces

  • kill - terminates process

  • ln - make links between files

  • ls- lists files in the namespace

  • mem - prints memory map

  • mkdir- creates directory

  • mount - mounts a filesystem

  • nc- TCP and UDP connections and listens

  • nslookup- queries domain name servers

  • ntpclient- set the system’s date from a remote host

  • perf - track kernel performance events

  • ping - ICMP ECHO requests

  • pm- monitors processes

  • printenv - print all or part of environment

  • ps- prints processes and threads

  • pshapp - delivers psh interpreter, exit, pshlogin and history commands

  • pshlogin - launches psh with user authentication

  • pwd- prints the name of current working directory

  • reboot - restarts the machine

  • reset - restore terminal from abnormal state

  • rm - unlink files or remove empty directorie

  • rmdir - remove empty directories

  • sync - synchronizes device

  • sysexec - launch program from syspage using given map

  • top - top utility

  • touch- changes file timestamp

  • tty - print or replace interactive shell tty device

  • umount - unmount a filesystem

  • unset - unset list of environment variables

  • uptime - prints how long the system has been running

  • wget - downloads a file using http

  • /- executes a file


When executing the psh from a name “psh” it is only possible to enter interactive mode or execute a script with -i.

If the psh is launched with a different name that corresponds to an available applet then the new psh executes only that applet and then close. Executing psh with a different name can be achieved using symbolic links.


Only one interactive session of the psh can be run in a scope of a psh process. For now, running psh does not spawn a new process, so in order to invoke a second, independent shell user must execute a psh binary file. See exec or / for examples.

See also#

  1. Utilities

  2. Table of Contents