How it works…

After using rbash, access to the system will be limited. In the preceding examples, we started the restricted shell by typing bash -r or rbash.

Next, we tried to change the directory, but we got the rbash: cd: restricted message, so we cannot change the directory in rbash. Also, we cannot write contents into the file.

Get Bash Cookbook now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.