https://blog.csdn.net/GoDevelop/article/details/52314501?locationNum=2
- View system disk number
sudo fdisk -l
- Check the disk type
sudo blkid
As shown in the figure: sda1, 5, 6, and 7 in the figure correspond to the C, D, E, F disks under Windows, the file system is ntfs, the Linux partition is generally ext4, and the Windows partition is generally ntfs - Modify the configuration file The
sudo gedit /etc/fstab
configuration file contains the following items:
: Partition location, you can give the disk number, UUID or LABEL, for example: /dev/sda2, UUID=6E9ADAC29ADA85CD or LABEL=software
: The location of the specific mount point, for example: /media/ C
: mount disk type, linux partition is generally ext4, windows partition is generally ntfs
: mount parameters, generally defaults
: disk backup, the default is 0, no backup
: disk check, the default is 0, no check
Configuration diagram: - Check and mount the newly added items:
sudo mount -a
mount -a will mount all the items in /etc/fstab. If there is an error, it will prompt an error, and then find out the reason and modify it according to the error.
Note: Do not mount to the root directory of the current user, because the mounted partition will overwrite the contents of the current partition