NOTE
chroot
1. What Is chroot? A chroot in a Linux system is used to change the root directory. In a Linux system, the default directory structure begins with / ; chroot uses a specified location as the / location. 2. Why chroot Is Needed 2.1. Security Restrict
This is a historical learning note and may contain outdated or incomplete understanding.
1. What Is chroot?
A chroot in a Linux system is used to change the root directory.
In a Linux system, the default directory structure begins with /; chroot uses a specified location as the / location.
2. Why chroot Is Needed
2.1. Security
Restrict user privileges.
2.2. Isolation
Create a system directory structure isolated from the original system to facilitate user development.
3. How to Use chroot
mkdir -p new_root/bin
cp /bin/bash new_root/bin
cp -r /lib new_root
cp -r /lib64 new_root
sudo chroot new_root
Discussion
Sign in with GitHub to comment. Discussions are stored as GitHub Issues.View on GitHub