Loading... Linux 重新安装使用 [github项目](https://github.com/leitbogioro/Tools) **一.安装前准备** 如果你不是root用户,请尝试执行以下命令切换获取root用户权限: ``` sudo -s ``` 切换到root用户的默认方向 ``` cd ~ ``` 然后继续下载并执行这个脚本。 依赖项和操作系统支持以下列表,以安装到脚本支持的操作系统: 1.Debian系列(Debian / Ubuntu / Kali): ``` apt update -y ``` ``` apt install wget -y ``` 2.Alpine Linux: ``` apk update ``` ``` apk add bash wget ``` ``` sed -i 's/root:\/bin\/ash/root:\/bin\/bash/g' /etc/passwd ``` 3.其它依赖项和操作系统看:[github项目](https://github.com/leitbogioro/Tools) **二.下载系统** ``` wget --no-check-certificate -qO InstallNET.sh 'https://raw.githubusercontent.com/leitbogioro/Tools/master/Linux_reinstall/InstallNET.sh' && chmod a+x InstallNET.sh ``` 中国大陆服务器: ``` wget --no-check-certificate -qO InstallNET.sh 'https://gitee.com/mb9e8j2/Tools/raw/master/Linux_reinstall/InstallNET.sh' && chmod a+x InstallNET.sh ``` **三.开始安装相应 Linux 系统** 【默认用户名,对于 Linux:root,对于 Windows:管理员,默认密码,对于Linux: *LeitboGi0ro* ,对于Windows: *Teddysun.com*,默认端口,Linux 系统:与之前通过终端连接的系统相同。Windows 系统:3389 】 1.Debian系统 ``` bash InstallNET.sh -debian ``` 2.Ubuntu 22.04 ``` bash InstallNET.sh -ubuntu ``` 3.Alpine Linux Edge ``` bash InstallNET.sh -alpine ``` 4.CentOS 9 stream ``` bash InstallNET.sh -centos ``` 5.Windows 11 Pro for Workstations ``` bash InstallNET.sh -windows ``` 四.常用系统一键脚本 一键 debian 11或12【安装debian 12系统,修改为debian 12,设置亚洲上海时区,密码为admin888,名称是admin888,bbr,建议安装前修改密码】 ``` bash <(curl -sSL https://raw.githubusercontent.com/leitbogioro/Tools/master/Linux_reinstall/InstallNET.sh) -debian 11 -timezone "Asia/Shanghai" -pwd 'admin888' -hostname "admin888" -swap "1024" --bbr ``` 五.其它说明 对于 Debian,官方推荐的镜像列表在这里: ``` https://www.debian.org/mirror/list.html ``` 高级用法,例如 Debian 11(推荐用于中国大陆以外的服务器) 以更换为美国镜像的一键安装代码为例 ``` bash <(curl -sSL https://raw.githubusercontent.com/leitbogioro/Tools/master/Linux_reinstall/InstallNET.sh) -debian 11 -mirror "https://mirrors.ocf.berkeley.edu/debian/" -timezone "Asia/Shanghai" -pwd 'admin888' -hostname "admin888" -swap "1024" --bbr ``` 下面是各国镜像地址 日本: ``` bash InstallNET.sh -debian 12 -mirror "http://ftp.riken.jp/Linux/debian/debian/" ``` 香港: ``` bash InstallNET.sh -debian 12 -mirror "http://ftp.hk.debian.org/debian/" ``` 新加坡: ``` bash InstallNET.sh -debian 12 -mirror "http://ftp.sg.debian.org/debian/" ``` 韩国: ``` bash InstallNET.sh -debian 12 -mirror "http://ftp.kaist.ac.kr/debian/" ``` 台湾: ``` bash InstallNET.sh -debian 12 -mirror "http://ftp.tw.debian.org/debian/" ``` 美国: ``` bash InstallNET.sh -debian 12 -mirror "https://mirrors.ocf.berkeley.edu/debian/" ``` 加拿大: ``` bash InstallNET.sh -debian 12 -mirror "http://ftp.ca.debian.org/debian/" ``` 英国: ``` bash InstallNET.sh -debian 12 -mirror "http://ftp.uk.debian.org/debian/" ``` 德国: ``` bash InstallNET.sh -debian 12 -mirror "http://ftp.de.debian.org/debian/" ``` 最后修改:2025 年 06 月 29 日 © 允许规范转载 赞 如果觉得我的文章对你有用,请随意赞赏