Skip to content

End of Life Ruby 3.0 has reached end of life and gets no more fixes. Switch to Ruby 4.0 →

class method

Dir.chroot

Dir.chroot( string ) → 0

Changes this process’s idea of the file system root. Only a privileged process may make this call. Not available on all platforms. On Unix systems, see chroot(2) for more information.

See also .children .delete .chdir .each_child also in 4.1 · 4.0 · 3.4 · 3.3 · 3.2 · 3.1