September 2009
Beginner
942 pages
85h 34m
English
A restricted shell is one that disallows certain actions, such as changing directory, setting PATH, or running commands whose names contain a / character. See the Bash manpage for the full list of restrictions.
To run a restricted shell, enter the command bash -r. Depending on your Linux distribution, you may also be able to enter the command as rbash.
You can still run shell scripts, since in that case the restricted shell calls the unrestricted version of the shell to run the script after it reads /etc/profile, $HOME/.profile, and other startup files.
Restricted shells are not used much in practice, as they are difficult to set up correctly.