---
# System prepended metadata

title: ubuntu開機後自動掛載硬碟分區

---

# ubuntu開機後自動掛載硬碟分區
## 安裝gnome-disk (ubuntu 已內建)
```bash=
sudo apt update
sudo apt install gnome-disk-utility
```
![](https://hackmd.io/_uploads/rJytZWf63.png)
## 創建並設定掛載位置
將以下的`TOSHIBA_DT01ACA300`替換成你的硬碟名稱（或任何你想取的名字）
```bash=
cd /mnt
sudo mkdir TOSHIBA_DT01ACA300
sudo chmod 777 TOSHIBA_DT01ACA300
```
選取要掛載的磁區
![](https://hackmd.io/_uploads/ByJpW-GTn.png)
點擊左下的設定紐 => Edit Mount Options
![](https://hackmd.io/_uploads/HJLyMZfpn.png)
1. 將"User Session Defaults"選項關閉
2. 開啟"Mount at system startup"選項
3. Display Name欄位輸入硬碟名稱
4. Mount Point輸入剛剛創見的資料夾
5. 按OK
![](https://hackmd.io/_uploads/SJ7gXZfpn.png)

## 從ubuntu dock中移除硬碟符號
![](https://hackmd.io/_uploads/BJmL6lfTh.png)
```bash=
gsettings set org.gnome.shell.extensions.dash-to-dock show-mounts false
```