From GhostBSD Wiki
Jump to: navigation, search
Welcome to Icon Disti GhostBSD.png Rc.
rc - shell
The generic hook into OpenRC.
Ordering rc-scripts
Scripts to run OpenRC
Scripts to run OpenRC
Scripts automatically executed at boot and shutdown
Special scripts
Configuration file for devd(8)
Initscript Configuration Files
Smaller configuration files
Specifies the default settings for all the available options.
The global OpenRC configuration file
GhostBSD specific configurations
Safely edit system rc files
Shows which services are running
Add or delete services
Locate and run an OpenRC service
Back to the Icon Disti GhostBSD.pngSystem


rc is a command interpreter and programming language similar to sh(1). It is based on the AT&T Plan 9 shell of the same name. The shell offers a C-like syntax (much more so than the Cshell) and a powerful mechanism for manipulating variables. It is reasonably small and reasonably fast, especially when compared to contemporary shells. Its use is intended to be interactive, but the language lends itself well to scripts.
rc is the base of all scripts and files related to OpenRC.


Syntax: rc [Option] [-c command] [arguments]

There are options with this letters: [-deiIlnopsvx]

If -c is present, commands are executed from the immediately following argument. Any further arguments to rc are placed in $*. Thus:

rc -c 'echo $*' 1 2 3
prints out: 1 2 3


A simple command is a sequence of words, separated by white space (space and tab) characters that ends with a newline, semicolon (;), or ampersand (&). The first word of a command is the name of that command. If the name begins with /, ./, or ../, then the name is used as an absolute path name referring to an executable file. Otherwise, the name of the command is looked up in a table of shell functions, builtin commands, or as a file in the directories named by $path.

More Tasks[edit]

There are Task like: