.lf 1 ./rbash.1 .TH RBASH 1 "2021 November 22" "Bash-5.2" .SH NAME rbash \- restricted bash, see \fBbash\fR(1) .SH RESTRICTED SHELL .nr zY 1 .lf 1 ./bash.1 .\" .\" MAN PAGE COMMENTS to .\" .\" Chet Ramey .\" Case Western Reserve University .\" chet.ramey@case.edu .\" .\" Last Change: Mon Apr 7 16:59:13 EDT 2025 .\" .\" For bash_builtins, strip all but "SHELL BUILTIN COMMANDS" section .\" For rbash, strip all but "RESTRICTED SHELL" section .\" .\" Both conditionalize text based on the base page being formatted .\" using the zZ and zY registers, respectively .\" .\" Ensure the registers are initialized to avoid groff warnings. .nr zZ +0 .nr zY +0 .\" Ensure the macros/strings are initialized to avoid groff warnings. .ds zZ \" empty .ds zY \" empty .if \n(zZ=1 .ig zZ .PP If .B bash is started with the name .BR rbash , or the .B \-r option is supplied at invocation, the shell becomes \fIrestricted\fP. A restricted shell is used to set up an environment more controlled than the standard shell. It behaves identically to .B bash with the exception that the following are disallowed or not performed: .IP \(bu Changing directories with \fBcd\fP. .IP \(bu Setting or unsetting the values of .SM .BR SHELL , .SM .BR PATH , .SM .BR HISTFILE , .SM .BR ENV , or .SM .BR BASH_ENV . .IP \(bu Specifying command names containing .BR / . .IP \(bu Specifying a filename containing a .B / as an argument to the .B . builtin command. .IP \(bu Using the \fB\-p\fP option to the .B . builtin command to specify a search path. .IP \(bu Specifying a filename containing a slash as an argument to the .B history builtin command. .IP \(bu Specifying a filename containing a slash as an argument to the .B \-p option to the .B hash builtin command. .IP \(bu Importing function definitions from the shell environment at startup. .IP \(bu Parsing the values of .SM .B BASHOPTS and .SM .B SHELLOPTS from the shell environment at startup. .IP \(bu Redirecting output using the >, >|, <>, >&, &>, and >> redirection operators. .IP \(bu Using the .B exec builtin command to replace the shell with another command. .IP \(bu Adding or deleting builtin commands with the .B \-f and .B \-d options to the .B enable builtin command. .IP \(bu Using the \fBenable\fP builtin command to enable disabled shell builtins. .IP \(bu Specifying the .B \-p option to the .B command builtin command. .IP \(bu Turning off restricted mode with \fBset +r\fP or \fBshopt \-u restricted_shell\fP. .PP These restrictions are enforced after any startup files are read. .PP .ie \n(zY=1 When a command that is found to be a shell script is executed, .el \{ When a command that is found to be a shell script is executed (see .SM .B "COMMAND EXECUTION" above), .\} .B rbash turns off any restrictions in the shell spawned to execute the script. .\" end of rbash.1 .lf 7 ./rbash.1 .SH SEE ALSO bash(1)