wiki:UsersGuide/Shell

Version 1 (modified by Jiri Svoboda, 14 years ago) ( diff )

Shell

HelenOS is primarily controlled by means of an interactive shell called Bdsh. This sections teaches you the basics of using this shell.

Type help (+Enter) to get a list of built-in commands.

Basics

The shell supports common text-editing controls. In addition to that the following controls are defined:

Keystroke Action
Enter Submit and execute the command
Up Arrow Move to older history entry
Down Arrow Move to newer history entry

(Trunk Only) Other command-line driven applications (e.g. SBI) support exactly the same controls as the shell. (The command-line input is implemented in a common library called CLUI).

Internal Shell Commands

The shell supports a few basic commands which are built into it. (Such as listing directories, creating and moving them, deleting files, etc). Other HelenOS commands are external (i.e. these are executable files on the file system) - this is similar to other operating systems.

To get a list of internal commands supported by the shell enter the command:

# help

External Commands

Most other HelenOS functionality is implemented in regular executable files (external commands), similar to other operating systems. These executables are traditionally divided into two groups: applications and servers.

Servers can be though similar to UNIX daemons. When you run them in the right way, they will return control to the command line, but continue running on the background. To obtain a list of available servers:

# ls /srv

Applications are regular executables that perform some task and terminate. They can also be interactive applications (e.g. Tetris). To obtain a list of available applications, enter:

# ls /app

To execute a server or application, simply type its name (plus enter) on the command line. (Some servers or apps require command-line arguments, however). To run Tetris, for example, enter:

# tetris
Note: See TracWiki for help on using the wiki.