安裝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 0mm1024x768 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: 2wifis:wlan0:dhcp4: trueoptional: trueaccess-points:"YourSSID":password: "YourPassword"
然后應用配置:
sudo netplan apply