# Usb automount



## anonbsdguy (May 3, 2020)

Hello,

Every time i want to mount my usb i have to do:
sudo mount_msdosfs /dev/da0sa /media/flash
It's getting quite annoying and repetitive.
how can i automate this task, so that any time i plugin a usb it just works, like in linux
i want it to get automounted


----------



## mark_j (May 4, 2020)

Look at autofs in the handbook.








						Chapter 19. Storage
					

This chapter covers the use of disks and storage media in FreeBSD. This includes SCSI and IDE disks, CD and DVD media, memory-backed disks, and USB storage devices.




					www.freebsd.org


----------



## romanaOne (May 4, 2020)

There's also dsbmd.

I've only used it with a few different USB drives and the x11-fm/caja file manager, but it seems pretty robust so far. It's a bit simpler to set up, requiring just one new service instead of 3 (automountd, automountd, automount). It also requires fewer changes to files in /etc, I think just vfs.usermount=1 in /etc/sysctl.conf.


----------



## mark_j (May 4, 2020)

Beware that dsbmd conflicts with HalD so if you're running a window manager that uses it, then you will have issues.


----------



## Sevendogsbsd (May 5, 2020)

Vermaden’s automount is easy to set up and works perfectly. https://github.com/vermaden/automount


----------

