diff --git a/linux/fstab.md b/linux/fstab.md new file mode 100644 index 0000000..f7e8434 --- /dev/null +++ b/linux/fstab.md @@ -0,0 +1,46 @@ +# /etc/fstab +The file where the default mounts are stored. + +<> - Is used to mark that you need to fill that in + +The ```nofail```-flag is so that boot does not hang till it is mounted. You may need to run ```sudo mount -a``` after boot. + +# Mounting a drive + +## Local DRIVES + +### BTRFS +Example: +``` +UUID= btrfs noatime,compress=zstd,ssd,space_cache=v2,discard=async,nofail 0 0 +``` + +### NTFS (ntfs-3g) +Example: +``` +UUID= ntfs-3g defaults,nofail,uid=1000,gid=1000,umask=022,noatime,big_writes,x-systemd.automount,x-systemd.device-timeout=10 0 0 +``` + + +## NFS +Example: +``` +: nfs rw,_netdev,nofail,noatime,nconnect=8,rsize=1048576,wsize=1048576,x-systemd.automount 0 0 +``` + +!!! You need to have the UIDs matched for read and write access to the files on the NFS share. + +## SAMBA (CIFS) +Example: +``` +/// cifs credentials=,nofail,vers=3.1.1,iocharset=utf8,rw,uid=1000,gid=1000,file_mode=0660,dir_mode=0770,hard,intr,cache=loose 0 0 +``` +Credentials: +``` +username= +password= +``` +To get the names of the shares: +``` +smbclient -L // -U +``` \ No newline at end of file