1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24
| sudo fdisk -l sudo blkid sudo fdisk /dev/sda
sudo mount /dev/sda ~/HDD sudo umount /dev/sda
sudo mkfs.ext4 /dev/sda sudo mkfs.ext4 /dev/sda1 sudo e2label /dev/sda Momoda sudo e2label /dev/sda ls /dev/disk/by-label/momoda
sudo chown $USER:$USER ~/HDD
sudo mount.cifs //_windows_IP_or_hostname/_sharefolder ~/target_mount_path -o username=your_windows_username,password=your_windows_password,iocharset=utf8,file_mode=0777,dir_mode=0777
sudo apt install smartmontools sudo smartctl -a /dev/sda sudo hdparm -I /dev/sda
dos2unix /path/to/file unix2dos /path/to/file
|
1 2
| # <device> <mountpoint> <file system> <options> <dump> <fschk> /dev/disk/by-label/momoda /home/kaikai/Momoda ext4 defaults 0 0
|
关于 fstab 的参数说明:https://www.redhat.com/sysadmin/etc-fstab