-->

What are restricted shells and what commands are banned in such shells?

Whenever the user runs / executes a script or a portion of it in the restricted mode it causes the shell to disable certain commands which would otherwise be available for the users. This can be considered to a security feature of unix which minimises the risk of damage while running a script. The commands or actions that are disabled during a restricted execution are as follows:


- The cd command to change the directory is restricted.

- The changing of the environment variables is not allowed.

- The user is not permitted to perform output redirection.

- To exit the restricted mode within a script is also not allowed.

- The exec method cannot be invoked to substitute a different process for the shell.