Linux fstab

概览:

Arch Wiki: https://wiki.archlinux.org/index.php/Fstab_(简体中文)

挂载硬盘

自动挂载,请修改/etc/fstab文件

1
nano /etc/fstab

添加内容
ntfs和ext4的正常处理权限的写法
挂载ntfs请先安装ntfs-3g

1
sudo apt install ntfs-3g
1
2
/dev/sda1	/home/pi/resources	ntfs-3g	defaults,noexec,umask=0000	0	0
/dev/sda2 /home/pi/misc ext4 defaults 0 0

(权限 #)修复RaspberryPi的pi用户所属的用户组

pi用户所属的用户组列表

  • pi,
  • adm
  • dialout
  • cdrom
  • sudo
  • audio
  • video
  • plugdev
  • games
  • users
  • input
  • netdev
  • spi
  • i2c
  • gpio
1
usermod -G pi,adm,dialout,cdrom,sudo,audio,video,plugdev,games,users,input,netdev,spi,i2c,gpio pi

vfat & btrfs

sudo chown -R guzal:guzal /mnt/vfat /mnt/btrfs

1
2
3
4
5
6
guzal@GuzalAida:~$ cat /etc/fstab 
# UNCONFIGURED FSTAB FOR BASE SYSTEM
/dev/mmcblk0p1 /boot vfat defaults 0 2
/dev/mmcblk0p2 / f2fs defaults,noatime 0 1
UUID="DAA9-53E7" /mnt/vfat vfat defaults,rw,noexec,noatime,nofail,user,umask=0000,uid=1000,gid=1000 0 0
UUID="225ddd42-b107-4c01-a9ef-da0b38997305" /mnt/btrfs btrfs defaults,rw,noexec,noatime,user,nofail 0 0
------ 文章已经结束,谢谢你的阅读 ------
------ article has ended,thank you for reading ------
Thanks support Me

---------------- The End ----------------