Proot Server is a powerful shell script that enables you to install and run various Linux distributions (Ubuntu, Alpine, Debian, or Fedora) in a proot environment. This tool is particularly useful for setting up Linux environments on systems where you don't have root access or in situations where you need isolated Linux instances.
- Multiple Distribution Support: Choose from Ubuntu 20.04 Focal Fossa, Alpine 3.19, Debian 12 Bookworm, or Fedora 40.
- Architecture Compatibility: Supports x86_64 (amd64) and aarch64 (arm64) architectures.
- Proot Integration: Utilizes proot for creating a chroot-like environment without requiring root privileges.
- Persistent Installation: Installed distributions can be reused in subsequent runs.
- Automatic Dependency Handling: Downloads and sets up proot if not already installed.
- DNS Configuration: Automatically sets up DNS resolution using Cloudflare's DNS servers.
curl
: For downloading distribution files and proot.tar
: For extracting downloaded files.- Internet connection for downloading necessary files.
-
Clone the Repository:
git clone https://github.com/linuztx/proot-server.git cd proot-server
-
Run the Script:
./run.sh
-
Choose a Distribution:
- Select from options 1-4 to install a new distribution.
- Choose option 5 to use an already installed distribution.
-
Installation Process:
- The script will download the selected distribution's rootfs.
- It will extract the files and set up the environment.
-
Proot Setup:
- If not present, the script will download and configure proot.
-
Entering the Environment:
- After setup, you'll be automatically entered into the proot environment.
- Use
su
to switch to root user within the environment.
-
Exiting the Environment:
- Type
exit
twice to fully exit the proot environment.
- Type
- Ubuntu 20.04 Focal Fossa
- Alpine 3.19
- Debian 12 Bookworm
- Fedora 40
The script creates directories for each installed distribution:
./ubuntu
for Ubuntu./alpine
for Alpine./debian
for Debian./fedora
for Fedora
The script automatically sets up /etc/resolv.conf
with Cloudflare's DNS servers (1.1.1.1 and 1.0.0.1).
- While proot provides a chroot-like environment, it does not offer full system isolation.
- Some operations requiring true root access may not function as expected.
- If downloads fail, the script will retry up to 10 times with a 1-second delay between attempts.
- Ensure you have a stable internet connection for successful downloads.
This project is licensed under the MIT License. See the LICENSE file for details.