💾 Archived View for kelgors.me › wiki › mount.gmi captured on 2024-05-12 at 15:06:35. Gemini links have been rewritten to link to archived content

View Raw

More Information

⬅️ Previous capture (2023-12-28)

-=-=-=-=-=-=-

Mounting drives and shares

2022-08-15

Using mount command

mount /dev/sdb1 /media/usbdrive

In /etc/fstab

Drive

# mount a drive
UUID=<uuid>	/backup	 ext4    defaults 0 0

Samba share

# mount a smb share
//xxx.xxx.x.x/ShareName			/backup		cifs	rw,iocharset=utf8,uid=1000,gid=1000,credentials=/etc/smbclient.conf		0	0

And put your credentials in `/etc/smbclient.conf`

username=user
password=pass

/etc/fstab

Structure of the file:

<File system>   <mnt>   <type fs>   <options>   <dump>  <pass>

File system

It could be the path to the device like `/dev/sda1` or the UUID of the drive (more reliable), you can get it with `lsblk`

Mounting point

It's the path where you want to mount your device. It could be anything like /mnt/backup or /home for example.

File system type

It's the partition of your drive like (ext4, fat32, ...)

Options

Dump

Use by dump. It can be 0 or 1. If 0, dump will ignore it.

Pass

Use by fschk. Can be 2 enable fschk to check it or 0 to ignore it. 1 is reserved for root partition

Last-Updated: 2022-08-15