Ubuntu16 04 開機自動掛載分割槽

2021-08-21 19:19:05 字數 1168 閱讀 6671

系統版本:ubuntu16.04

ubuntu系統新增了一塊硬碟,開機沒有自動掛載,下邊講一下方法:

1)建立乙個目錄,作為硬碟的掛載目錄,mkdir /home/shuke。

2)檢視硬碟的uuid,使用sudo blkid,結果類似下邊的輸出:

/dev/sda1: uuid="62ddf23a-39ab-47fe-9a37-62792a0b9119" type="swap" partuuid="e5e88599-01"

/dev/sda5: uuid="d05e4ffc-3457-48b7-83e1-e4ef08fd9818" type="ext4" partuuid="e5e88599-05"

/dev/sdb5: uuid="4d77ed21-1f2b-47c3-b051-aa372e70e4cd" type="ext4" partuuid="3f397bd0-05"

# /etc/fstab: static file system information.

## use 'blkid' to print the universally unique identifier for a

# device; this may be used with uuid= as a more robust way to name devices

# that works even if disks are added and removed. see fstab(5).##

# / was on /dev/sda5 during installation

uuid=d05e4ffc-3457-48b7-83e1-e4ef08fd9818 /               ext4    errors=remount-ro 0       1

# swap was on /dev/sda1 during installation

uuid=62ddf23a-39ab-47fe-9a37-62792a0b9119 none            swap    sw              0       0

uuid=4d77ed21-1f2b-47c3-b051-aa372e70e4cd /home/shuke               ext4    errors=remount-ro 0       1

新增標紅的行,然後重啟系統即可自動掛載新硬碟(分割槽)。

Ubuntu16 04如果設定開機啟動

開啟rc local.servicecd lib systemd system sudo vim rc local.service開啟後看到如下內容 unit description etc rc.local compatibility conditionfilei ecutable etc rc....

Ubuntu16 04開機啟動ssh服務

ubuntu系統16.04新安裝時候是不帶ssh服務的,需要自己安裝 1 安裝vim 新安裝的ubuntu系統是不帶vim sudo apt get install vim 2 安裝openssh sudo apt get install openssh server 3 配置sshd config...

ubuntu16 04自動設定行號

第一步 安裝vim 命令為 sudo apt get install vim 第二步 更改vim的配置檔案etc vim命令為 1 cd etc vim 2 sudo gedit vimrc 第三步 在vimrc最後令起一行插入下面內容 syntax on set tabstop 4 set shi...