| 發行版 | Grub 編輯參數 | 關鍵命令序列 |
|---|---|---|
| Red Hat / CentOS / Fedora | kernel 行尾加 single 或 S | mount -t proc proc /procmount -o remount,rw /passwdsync; reboot |
| Debian / Ubuntu | 選 recovery mode → kernel 行 ro single 改 rw single init=/bin/bash | mount -apasswd rootreboot |
| SUSE | kernel 行加 init=/bin/bash | mount -n / -o remount,rwpasswdmount -n / -o remount,ro |
| FreeBSD | 啟動選單選 4 進單用戶模式 | mount -a; fsck -y; passwd root; init 6 |
| Solaris | 選 solaris failsafe → 掛載 /a 為讀寫 | passwd; init 6 |
.tar.bz2:tar jxvf file.tar.bz2.tar.gz:tar zxvf file.tar.gz.rpm:rpm -ivh file.rpm| 發行版 | 安裝指令 | 服務管理 |
|---|---|---|
| Debian | apt-get install openssh-server | /etc/init.d/ssh restart |
| Ubuntu | sudo apt-get install openssh-server | sudo /etc/init.d/ssh restart |
| FreeBSD | 預設安裝 | /etc/rc.d/sshd restart |
| RHEL/CentOS | yum install openssh-server | systemctl restart sshd (7+)/etc/init.d/sshd restart (6) |