Try   HackMD

安裝Ubuntu 20.04

  • VMware Workstation 16 Player安裝Ubuntu 20.04

https://blog.xuite.net/yh96301/blog/341981056-VMware+Workstation+16+Player安裝Ubuntu+20.04>

  • Ubuntu Server 20.04.1 安裝和設定教學

https://www.footmark.info/linux/ubuntu/ubuntu-server-install/

  • Ubuntu Server 20.04.1 預設 UFW 防火牆 Firewall 設定規則詳解和教學

https://www.footmark.info/linux/ubuntu/ubuntu-server-ufw/

  • 輕鬆製作可開機的 USB 磁碟機

https://rufus.ie/zh_TW/

需留意的點是,Ubuntu常常預設不會把所有VG的硬碟空間分配給LV,請自已手動調整

Image Not Showing Possible Reasons
  • The image file may be corrupted
  • The server hosting the image is unavailable
  • The image path is incorrect
  • The image format is not supported
Learn More →


常用指令


  • 將 Ubuntu 系統套件與版本更新到最新:
sudo apt-get update && sudo apt-get upgrade -y
  • 系統時區
  1. Ubuntu Server 預設使用 UTC 時區,通常都會設定為所在地區的時間。
  2. 查看系統上目前的時間和時區:
timedatectl
  1. 列出所有可用時區:
timedatectl list-timezones
  1. 將時區設定為台灣的 Asia/Taipei:
timedatectl set-timezone Asia/Taipei
  • 手動設定固定 IP
  1. 先將預設產生的設定檔複製留存
sudo cp /etc/netplan/00-installer-config.yaml /etc/netplan/00-installer-config.yaml.bak
  1. 編輯網路設定檔,來手動設定網路管理模式、固定 IP、網路遮罩、預設閘道、DNS Server 等資訊
sudo vim /etc/netplan/00-installer-config.yaml

請留意:

  • 是addresses
  • 所有:後面都要空一格,才能繼續輸入值
# This is the network config written by 'subiquity' network: renderer networkd # 網路管理模式使用 Network Manager,未設定預設使用 systemd-workd ethernets: enp0s3: # 網路裝置 dhcp4: false # false: 關閉 DHCP;true: 啟用 addresses: [61.216.xx.xx/24] # 固定 IP 與網路遮罩 gateway4: 61.216.xx.254 # 預設閘道 nameservers: addresses: [8.8.8.8, 168.95.1.1] # DNS Server version: 2
  1. 測試新網路設定是否正確,若設定檔語法正確,就會套用新的網路設定,並讓管理者進行確認。如果在 120 秒內沒有 Enter 確認,就會自動恢復成未設定前原來的網路設定,此功能可避免在遠端更改網路設定有誤時,將自己檔在伺服器外面
sudo netplan try

如果出現以下錯誤訊息

An error occurred: 'NetplanApply' object has no attribute 'state'

則是2021-10-28的bug report

  • netplan try is broken

https://bugs.launchpad.net/ubuntu/+source/netplan.io/+bug/1949104
https://askubuntu.com/questions/1369646/ubuntu-21-10-netplan-object-has-no-attribute-state

請改用以下指令

sudo netplan try --state /etc/netplan
  1. 也可直接套用新的網路設定檔
sudo netplan apply