man pages section 1: User Commands

Exit Print View

Updated: July 2014

rbash (1)


rbash - restricted bash, see bash(1)




User Commands                                            RBASH(1)

     rbash - restricted bash, see bash(1)


     If  bash is started with the name rbash, or the -r option is
     supplied at invocation, the  shell  becomes  restricted.   A
     restricted  shell is used to set up an environment more con-
     trolled than the standard shell.  It behaves identically  to
     bash with the exception that the following are disallowed or
     not performed:

     o    changing directories with cd

     o    setting or unsetting the values of SHELL, PATH, ENV, or

     o    specifying command names containing /

     o    specifying a file name containing a / as an argument to
          the .  builtin command

     o    Specifying a filename containing a slash as an argument
          to the -p option to the hash builtin command

     o    importing  function definitions from the shell environ-
          ment at startup

     o    parsing the value of SHELLOPTS from the shell  environ-
          ment at startup

     o    redirecting  output using the >, >|, <>, >&, &>, and >>
          redirection operators

     o    using the exec builtin command  to  replace  the  shell
          with another command

     o    adding  or deleting builtin commands with the -f and -d
          options to the enable builtin command

     o    Using the enable builtin  command  to  enable  disabled
          shell builtins

     o    specifying the -p option to the command builtin command

     o    turning off restricted mode  with  set  +r  or  set  +o

     These  restrictions are enforced after any startup files are

GNU Bash-4.1      Last change: 2009 December 30                 1

User Commands                                            RBASH(1)

     When a command that is found to be a shell  script  is  exe-
     cuted (see COMMAND EXECUTION under bash(1)), rbash turns off
     any restrictions in the shell spawned to execute the script.

     See   attributes(5)   for   descriptions  of  the  following

     |Availability   | shell/bash       |
     |Stability      | Volatile         |
     Bash Reference Manual, Brian Fox and Chet Ramey
     The Gnu Readline Library, Brian Fox and Chet Ramey
     The Gnu History Library, Brian Fox and Chet Ramey
Utilities, IEEE
     Portable Operating System Interface (POSIX)  Part  2:  Shell
     sh(1), ksh(1), csh(1)
     emacs(1), vi(1)

          The bash executable
          The rbash executable
          The systemwide initialization file, executed for  login
          The  personal  initialization  file, executed for login
          The individual per-interactive-shell startup file
          The individual login shell cleanup file, executed  when
          a login shell exits
          Individual readline initialization file

     Brian Fox, Free Software Foundation

     Chet Ramey, Case Western Reserve University

GNU Bash-4.1      Last change: 2009 December 30                 2

User Commands                                            RBASH(1)

     If you find a bug in bash, you should report it.  But first,
     you should make sure that it really is a bug,  and  that  it
     appears  in  the latest version of bash.  The latest version
     is always available from

     Once you have determined that a bug actually exists, use the
     bashbug  command to submit a bug report.  If you have a fix,
     you are encouraged to mail that as  well!   Suggestions  and
     `philosophical'   bug   reports   may   be  mailed  to  bug- or posted to the Usenet newsgroup gnu.bash.bug.

     ALL bug reports should include:

     The version number of bash
     The hardware and operating system
     The compiler used to compile
     A description of the bug behaviour
     A short script or `recipe' which exercises the bug

     Comments  and bug reports concerning this manual page should
     be directed to

     This  software  was   built   from   source   available   at    The  original
     community       source       was       downloaded       from

     Further  information about this software can be found on the
     open source community  website  at

GNU Bash-4.1      Last change: 2009 December 30                 3