Overview
The reinstall script allows one-click reinstallation of Linux and Windows OS on VPS/dedicated servers. Supports:
-
Linux & Windows distributions
-
BIOS/UEFI and ARM servers
-
Official ISO/IMG images
Warning: Running the script will erase all data on the selected disk. Backup first.
Download Script
Linux
# Global (Outside China)
curl -O https://raw.githubusercontent.com/bin456789/reinstall/main/reinstall.sh || wget -O ${_##*/} $_
# Specified with a commit (bug fix)commit_id=780e1a6 curl -O https://raw.githubusercontent.com/bin456789/reinstall/$commit_id/reinstall.sh || wget -O ${_##*/} $_ sed -i "/^confhome.*main$/s/main/$commit_id/" reinstall.sh
# China mirror
curl -O https://cnb.cool/bin456789/reinstall/-/git/raw/main/reinstall.sh || wget -O ${_##*/} $_
Windows
# Disable Windows Defender Real-Time Protection
certutil -urlcache -f -split https://raw.githubusercontent.com/bin456789/reinstall/main/reinstall.bat
# China mirror
certutil -urlcache -f -split https://cnb.cool/bin456789/reinstall/-/git/raw/main/reinstall.bat
Usage Commands – Linux
bash reinstall.sh anolis 7|8|23
bash reinstall.sh rocky 8|9|10
bash reinstall.sh oracle 8|9
bash reinstall.sh almalinux 8|9|10
bash reinstall.sh opencloudos 8|9|23
bash reinstall.sh centos 9|10
bash reinstall.sh fedora 41|42
bash reinstall.sh nixos 25.05
bash reinstall.sh debian 9|10|11|12|13
bash reinstall.sh opensuse 15.6|tumbleweed
bash reinstall.sh alpine 3.19|3.20|3.21|3.22
bash reinstall.sh openeuler 20.03|22.03|24.03|25.03
bash reinstall.sh ubuntu 16.04|18.04|20.04|22.04|24.04|25.04 [--minimal]
bash reinstall.sh kali
bash reinstall.sh arch
bash reinstall.sh gentoo
bash reinstall.sh aosc
bash reinstall.sh fnos
bash reinstall.sh redhat --img="http://access.cdn.redhat.com/xxx.qcow2"
Optional Linux Parameters
--password PASSWORD # Set root password
--ssh-key KEY # Add SSH public key
--ssh-port PORT # Set SSH port
--web-port PORT # Set web server port
--frpc-toml /path/to/frpc.toml # FRP configuration
--hold 2 # Do not reboot; mount system at /os
Usage Commands – Windows
reinstall.bat windows 10
reinstall.bat windows 11
reinstall.bat windows server 2008
reinstall.bat windows server 2008 R2
reinstall.bat windows server 2012
reinstall.bat windows server 2012 R2
reinstall.bat windows server 2016
reinstall.bat windows server 2019
reinstall.bat windows server 2022
reinstall.bat windows server 2025
Optional Windows Parameters
--password PASSWORD # Set administrator password
--frpc-toml /path/to/frpc.toml # FRP configuration
Note: Disable Windows Defender Real-Time Protection before running.
Notes & Best Practices
-
Linux commands must be run as root, Windows as Administrator.
-
Data on the target disk will be erased. Backup critical files first.
-
Supports BIOS/UEFI and ARM servers.
-
Linux
--holdoption allows manual adjustments; not supported for Debian/Kali. -
Not compatible with OpenVZ or LXC containers.
