安装SSH服务
# 安装 OpenSSH Server
sudo apt update
sudo apt install -y openssh-server
# 检查 SSH 服务状态
sudo systemctl status ssh
# Active: active (running) since Sat 2025-05-31 17:13:07 CST; 6s ago
# 重启服务
sudo systemctl restart ssh
自定义分辨率
新增
# 生成 Modeline
~/work/$ cvt 1920 1080 60
# 1920x1080 59.96 Hz (CVT 2.07M9) hsync: 67.16 kHz; pclk: 173.00 MHz
Modeline "1920x1080_60.00" 173.00 1920 2048 2248 2576 1080 1083 1088 1120 -hsync +vsync
# 新建显示模式
~/work/$ xrandr --newmode "1920x1080_60.00" 173.00 1920 2048 2248 2576 1080 1083 1088 1120 -hsync +vsync
# 添加显示模式
~/work/$ xrandr --addmode VGA-1-1 "1920x1080_60.00"
删除
# 查看显示器信息
~/work$ xrandr
Screen 0: minimum 320 x 200, current 1920 x 1080, maximum 8192 x 8192
VGA-2 disconnected (normal left inverted right x axis y axis)
HDMI-1 disconnected (normal left inverted right x axis y axis)
VGA-1-1 connected primary 1920x1080+0+0 (normal left inverted right x axis y axis) 0mm x 0mm
1024x768 60.00
800x600 60.32 56.25
640x480 59.94
1920x1080_60.00 59.96*
1872x1248_60.00 59.92
# 删除前先切换到其他模式
~/work$ xrandr --output VGA-1-1 --mode 1024x768
# 删除指定显示器的模式
~/work$ xrandr --delmode VGA-1-1 "1872x1248_60.00"
# 删除通用模式
xrandr --rmmode 1872x1248_60.00
开机自动连接wifi
如果你使用的是较新的 Ubuntu 版本(如 Ubuntu 17.10 及以后),可以使用 netplan
来配置网络。编辑 /etc/netplan/
目录下的 YAML 文件(例如 01-netcfg.yaml
),添加你的 WiFi 网络配置:
network:
version: 2
wifis:
wlan0:
dhcp4: true
optional: true
access-points:
"YourSSID":
password: "YourPassword"
然后应用配置:
sudo netplan apply