1 下载镜像:https://www.ubuntu.com/download/alternative-downloads
2 制作安装U盘:https://rufus.akeo.ie/?locale=zh_CN
3 用英语安装系统,安装Open SSH Server
4 配置WIFI
- 生成配置文件,其中
SSID
和password
是需要连接的无线网络的名称和密码
$sudo wpa_passphrase SSID password > /etc/wpa_supplicant.conf
- 查看无线设备名称
$iwconfig
- 编辑
/etc/network/interfaces
,添加如下内容,其中wlan0
是通过iwconfig
获取的无线设备名称
# The wireless network interface
auto wlan0
iface wlan0 inet dhcp
wpa-conf /etc/wpa_supplicant.conf
重启网络
$ sudo systemctl restart networking
5 禁用电源管理
- 编辑
/etc/systemd/logind.conf
[Login]
#NAutoVTs=6
#ReserveVT=6
#KillUserProcesses=no
#KillOnlyUsers=
#KillExcludeUsers=root
#InhibitDelayMaxSec=5
HandlePowerKey=ignore
HandleSuspendKey=ignore
HandleHibernateKey=ignore
HandleLidSwitch=ignore
HandleLidSwitchDocked=ignore
PowerKeyIgnoreInhibited=yes
SuspendKeyIgnoreInhibited=yes
HibernateKeyIgnoreInhibited=yes
LidSwitchIgnoreInhibited=yes
#HoldoffTimeoutSec=30s
IdleAction=ignore
#IdleActionSec=30min
#RuntimeDirectorySize=10%
#RemoveIPC=yes
#UserTasksMax=12288
- 重启logind
$ sudo service systemd-logind restart
6 安装中文环境和字体
$sudo apt-get -y install language-pack-zh-hans language-pack-zh-hans-base ttf-wqy-zenhei
7 更改locale
$sudo sudo localectl set-locale LANG=zh_CN.UTF-8 LANGUAGE=zh_CN