Linux FS Mount

From PedrosBrainDump
Revision as of 12:39, 10 October 2024 by 413vhcu1lq0463ob (talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

Hand mounting

Mount authenticated

sudo mount -t cifs //SERVER_NAME/path local -o username=your_username,password=your_password

Mount not authenticated

sudo mount -t cifs //SERVER_NAME/path local -o guest

/etc/fstab

The /etc/fstab is used to configure all mounting file system on Linux, with this file we can configure the mounting of SWAP, local blocks and nfs.

File architecture

origin destiny type options dump-option check-option 

Mounting SWAP

/swapfile none swap sw 0 0

Mounting local blocks

/dev/myvg/mylv /mnt ext4 defaults 0 0

Mounting remote smb shares

//remote_host/sharename /mnt/cifs-share cifs username=user,password=password,uid=1000,gid=1000,dir_mode=0777,file_mode=0777 0 0
  • uid will be the user owner of the directory
  • gid will be the group owner of the directory
  • dir_mode permissioning of the dir
  • file_mode permissioning of the files