準備工作

下載 iso 磁碟映像檔

Image Not Showing Possible Reasons
  • The image was uploaded to a note which you don't have access to
  • The note which the image was originally uploaded to has been deleted
Learn More →

安裝 rufus

進入 rufus 官網

進入下載區塊並下載

Image Not Showing Possible Reasons
  • The image was uploaded to a note which you don't have access to
  • The note which the image was originally uploaded to has been deleted
Learn More →

選擇想要的部分。

壓縮磁碟

進入電腦管理

Image Not Showing Possible Reasons
  • The image was uploaded to a note which you don't have access to
  • The note which the image was originally uploaded to has been deleted
Learn More →

進入存放裝置>磁碟管理,在要分割的硬碟右鍵點內容

Image Not Showing Possible Reasons
  • The image was uploaded to a note which you don't have access to
  • The note which the image was originally uploaded to has been deleted
Learn More →

磁碟區部分,確認分割樣式是否為 GPT,傳統硬碟和固態硬碟都一樣。

在要分割的磁碟區分區右鍵點擊壓縮磁碟區

Image Not Showing Possible Reasons
  • The image was uploaded to a note which you don't have access to
  • The note which the image was originally uploaded to has been deleted
Learn More →

選擇要壓縮的大小,以下圖為例,分配 128gb 空閒區域。

Image Not Showing Possible Reasons
  • The image was uploaded to a note which you don't have access to
  • The note which the image was originally uploaded to has been deleted
Learn More →

Image Not Showing Possible Reasons
  • The image was uploaded to a note which you don't have access to
  • The note which the image was originally uploaded to has been deleted
Learn More →

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 →
可能會遇到的問題

Image Not Showing Possible Reasons
  • The image was uploaded to a note which you don't have access to
  • The note which the image was originally uploaded to has been deleted
Learn More →

Solutions

方法1:禁用無法移動檔案

正如磁碟管理所言,壓縮磁碟區收到無法移動檔案的限制。Windows內置工具“磁碟管理”無法自動移動這些檔案,因此您需要手動禁用無法移動檔案。

這些檔案是隱藏的,因此首先要取消選中“隱藏受保護的作業系統檔案”,然後選中“顯示隱藏的檔案”以首先在“瀏覽”中查看這些文件。然後將展示如何在分割區C上禁用無法移動檔案。(建議在壓縮C槽後重新啟用它們。)

▪禁用系統保護:按“ Win + R”>輸入“ SystemProperitiesProtecion.exe”>按“ Enter”>單擊C槽>單擊“配置”>選擇“禁用系統保護”>單擊“套用”>單擊“是”>重新啟動
▪停用休眠:單擊“開始”>在搜索框中輸入“ CMD”>右鍵單擊“cmd”>選擇“以管理員身分運行”>輸入“ powercfg.exe /休眠關閉” >按“ Enter”>重新啟動
▪禁用頁面檔案:按“ Win + R”>鍵入“ SystemPropertiesPerformance.exe”>按“ Enter”>單擊“高級”>單擊“在虛擬內存下更改”>取消選中“自動管理所有磁碟機的頁面檔案大小” 單擊“設置”>單擊“確定”>重新啟動
▪禁用內核內存轉儲:單擊“開始”>選擇“控制面板”>單擊“系統和安全性”>單擊“系統” >單擊“高級系統設置”>單擊“啟動和恢復”下的“設置”>更改“寫”下的下拉菜單調試信息為“無”。

注意:也可以選擇完成上述所有設置後,再重新啟動電腦。

接下來,可以成功縮小C槽。

*可以在磁碟上運行磁碟清理,並為HDD運行磁碟碎片整理,以在C槽上獲得更多可用空間。

*不要忘記在Windows 10中壓縮磁碟區後重新啟用這些無法移動檔案。

安裝磁碟映像檔至 rufus

用系統管理員開啟 rufus,插入隨身碟,選擇裝置 (插入的隨身碟) 及開機模式 (iso),選擇該映像檔,資料分割配置選GPT。

Image Not Showing Possible Reasons
  • The image was uploaded to a note which you don't have access to
  • The note which the image was originally uploaded to has been deleted
Learn More →

點選執行

Image Not Showing Possible Reasons
  • The image was uploaded to a note which you don't have access to
  • The note which the image was originally uploaded to has been deleted
Learn More →

Image Not Showing Possible Reasons
  • The image was uploaded to a note which you don't have access to
  • The note which the image was originally uploaded to has been deleted
Learn More →

Image Not Showing Possible Reasons
  • The image was uploaded to a note which you don't have access to
  • The note which the image was originally uploaded to has been deleted
Learn More →

有跳出來的都點籃框的

這可能要花一段時間,因此先處理其他事情。
(若前面設定錯誤可能永遠無法完成)

變更電源選項

進入控制台>系統及安全性>電源選項>選擇按下電源按鈕時的行為

Image Not Showing Possible Reasons
  • The image was uploaded to a note which you don't have access to
  • The note which the image was originally uploaded to has been deleted
Learn More →

點選變更目前無法使用的設定 (如果有),關閉"開啟快速啟動"。

Image Not Showing Possible Reasons
  • The image was uploaded to a note which you don't have access to
  • The note which the image was originally uploaded to has been deleted
Learn More →

設定 BIOS

進入BIOS設置關閉Secure Boot,關閉fast boot,並設定USB為優先開機。

安裝

按照正常ubuntu安裝流程

install type

install type 選 something else(不是along with 或 erase)
下一頁會看到一堆分區,選 free space 的區域
分區用途:
ext4: 主要使用的區域,可選 mount 位置 (一般推薦分成 / 和 /home)
swap: 硬碟當記憶體用的區段,不用太多
我自己是設定:
size:8196, use as swap area
size:other, use as ext4 journalling, mount:/
確認分區後按continue

安裝後工作

更新套件

sudo apt update
sudo apt upgrade

安裝常用套件

sudo apt install build-essential       # c compiler and builder
sudo apt install python3-pip           # python package installer
sudo apt install curl                  # run web resource

認識 TTY 模式

TTY 模式是純文字界面,在桌面死當或無法恢復時通常還可以使用。

TTY 模式的進入方法為 ctrl + alt + F1~F6,但是並非所有接口都可以使用 (每台裝置不一樣,但是同裝置下每次開機純文字界面入口都會相同),所以最好全都試過 (可能有不只一個可以)。成功進入之後會有要你登入的純文字界面。

退出 TTY 模式有兩種方法:

  1. ctrl + alt + F1~F7
  2. 登入後輸入指令 chvt(num),如 chvt 7

認識 magic key

節錄自 https://blog.gtwang.org/linux/safe-reboot-of-linux-using-magic-sysrq-key/

一般的鍵盤上面都有一個 SysRq(system request)鍵,這個按鍵的位置一般來說跟 PrtSc(print screen)鍵合在一起。

SysRq 鍵俗稱 magic SysRq key,使用者可以靠這個鍵送出一些指令給 Linux 核心,除非整個系統完全當機,否則不管當時系統正在處理麼工作,藉由這樣的管道送出指令都可以讓 Linux 系統馬上回應,對於系統的救援相當有幫助。

首先檢查 /proc/sys/kernelsysrq 的內容。若為 0,代表未啟用,若為 1,代表全部啟用,若為其他,則須查表。建議將 sysrq 的內容改為 1 。

在一般 Linux 當機的狀況下,若要重新啟動系統,可以按住 Alt + SysRq 兩個鍵,然後依序按下以下幾個指令鍵:

r e i s u b

這些分別代表:

指令鍵 說明
r 將鍵盤解除 raw 模式(unraw)。
e 送出 SIGTERM 訊號至系統上所有的行程,讓所有正在執行中的程式正常關閉。
i 送出 SIGKILL 訊號至系統上所有的行程,強制所有正在執行中的程式立即關閉。
s 同步(sync)所有掛載磁碟的寫入,讓資料實際寫入實體磁碟。
u 以唯讀(read-only)方式重新掛載所有磁碟。
b 立即重新啟動系統(此動作並不會將資料同步寫入至硬碟,也不會讓硬碟卸載)。

移除沒用到的應用程式

進入 Ubuntu software > installed,將不想用的應用程式刪除。

Image Not Showing Possible Reasons
  • The image was uploaded to a note which you don't have access to
  • The note which the image was originally uploaded to has been deleted
Learn More →

設定固定ip

在設定>network:

Image Not Showing Possible Reasons
  • The image was uploaded to a note which you don't have access to
  • The note which the image was originally uploaded to has been deleted
Learn More →

先移除舊 profile(如果有),再點wired>齒輪

Image Not Showing Possible Reasons
  • The image was uploaded to a note which you don't have access to
  • The note which the image was originally uploaded to has been deleted
Learn More →

新增中文

ibus

先安裝中文套件

sudo apt install ibus-chewing

在設定頁面>:
進入 region&language > manage installed > Install/Remove Languages > 打勾 chinese(traditional)

Image Not Showing Possible Reasons
  • The image was uploaded to a note which you don't have access to
  • The note which the image was originally uploaded to has been deleted
Learn More →

接著重新啟動

reboot

進入keyboard
進入inputsource >

> other > chinese(chewing)

會在右上角顯示輸入法

用法

輸入法切換:Host + space
中英切換:shift
逗號句號等符號:對應shift + 對應(有些對應不直觀)
符號列表:backtick

切換快捷鍵位

預設輸入法切換為 Host + space,但是可以改成 ctrl + space
改法:在設定頁面>:
進入 keyboard > view and customize shortcuts > Typing > Switch to next input source

typing hotkey

fcitx5

  1. 安裝Fcitx5相關套件
# 安裝全部Fcitx5支援的輸入法
sudo apt install fcitx5 fcitx5-*

# 或是只安裝新酷音注音輸入法
sudo apt install fcitx5 fcitx5-chewing fcitx5-chinese-addons
  1. 開啟Terminal 輸入 im-config , 並按ok
Image Not Showing Possible Reasons
  • The image was uploaded to a note which you don't have access to
  • The note which the image was originally uploaded to has been deleted
Learn More →
  1. 若出現這個畫面,代表統有多個輸入方法,選擇 Yes
Image Not Showing Possible Reasons
  • The image was uploaded to a note which you don't have access to
  • The note which the image was originally uploaded to has been deleted
Learn More →
  1. 選取Fcitx5,確認後關閉視窗,並 reboot。
Image Not Showing Possible Reasons
  • The image was uploaded to a note which you don't have access to
  • The note which the image was originally uploaded to has been deleted
Learn More →
  1. 找到Fcitx 設定,並把Chewing(新酷音)加入
Image Not Showing Possible Reasons
  • The image was uploaded to a note which you don't have access to
  • The note which the image was originally uploaded to has been deleted
Learn More →

螢幕截圖

螢幕截圖有三種模式,視窗截圖、全螢幕截圖和區域截圖

一般來說有兩種進入方法:

  1. 按 host ,在上面的搜尋欄位打 screen,點擊 take a screenshot。
  2. 使用快捷鍵。

切換快捷鍵位

ubuntu 的預設快捷鍵為

  • 視窗截圖: alt + print
  • 全螢幕截圖: shift + print
  • 區域截圖: print

在 linux,print 鍵可能要用 fn + insert

可以進入設定頁面自由進行更改
改法:在設定頁面>:
進入 keyboard > view and customize shortcuts > Screenshots

screenshots hotkey

更改hostname

sudo vim /etc/hostname sudo vim /etc/hosts

更改字型

下載字型 (手動)

先看有沒有 ~/.local/share/fonts/ 資料夾,如果沒有,就建立它,建立完後,應該會看到自動生成的 uuid 檔案。

mkdir ~/.local/share/fonts/

接著下載想要的字型並解壓縮。
以 HackNerdFonts 為例,先到 github 下載 Hack.zip

放至 ~/.local/share/fonts/ 資料夾。

image

下載字型 (經由套件)

安裝字型大雜燴

sudo apt install fonts-noto

更新字型

下載完字型必須更新 (或是重新開機) 才會真正擁有。

fc-cache -fv

更改終端機字型設定

gnome-terminal 為例:
勾選 custum fonts 並選擇想要的字型。

terminal preference