NAME
init – initialize machine upon booting

SYNOPSIS
/$cputype/init [ –ctm ] [ command ... ]

DESCRIPTION
Init initializes the machine: it establishes the name space (see namespace(4) and newns in auth(2)), and environment (see env(3)) and starts a shell (rc(1)) on the console. If a command is supplied, that is run instead of the shell. On a CPU server the invoked shell runs cpurc(8) before accepting commands on the console; on a terminal, it runs termrc and then the user's profile. Options –t (terminal) and –c (CPU) force the behavior to correspond to the specified service class. Otherwise the default is CPU.

Init sets environment variables $service (to terminal or cpu), $objtype (to the value of $cputype), $user (to the contents of #c/user), and $timezone (to the contents of /adm/timezone/local).

With option –m init starts only an interactive shell regardless of the command or service class.

On a CPU server, init requires the machine's password to be supplied before starting rc on the console.

Init is invoked by boot(8), which sets the arguments as appropriate.

SOURCE
/sys/src/cmd/init.c

SEE ALSO
rc(1), auth(2), boot(8)
Copyright © 2024 Plan 9 Foundation. All rights reserved.