O'Reilly logo

Linux in a Nutshell, 6th Edition by Robert Love, Stephen Figgins, Ellen Siever, Arnold Robbins

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Restricted Shells

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.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required