+-------+ | linux | +-+-----+ | +------+--------+---------+---------+--------------+--------------+ | | | | | | | | v v v v v v | +------+ +-------+ +-------+ +--------+ +---------------+ +---------+ | | arch | | block | | certs | | crypto | | Documentation | | drivers | | +------+ +-------+ +-------+ +--------+ +---------------+ +---------+ | +-------+----------+--------+---------+--------+--------+---------+ | | | | | | | | | v v v v v v v | +----------+ +----+ +---------+ +------+ +-----+ +--------+ +-----+ | | firmware | | fs | | include | | init | | ipc | | kernel | | lib | | +----------+ +----+ +---------+ +------+ +-----+ +--------+ +-----+ | +-----+------+---------+------------+------------+------------+ | | | | | | | | v v v v v v | +----+ +-----+ +---------+ +---------+ +----------+ +-------+ | | mm | | net | | samples | | scripts | | security | | sound | | +----+ +-----+ +---------+ +---------+ +----------+ +-------+ | +------+--------+--------+ | | | v v v +-------+ +-----+ +------+ | tools | | usr | | virt | +-------+ +-----+ +------+
man udev
来查看详细/etc/udev/rules.d/
写入文件 99-deny_removable_storage.rules
:# disable USB storage SUBSYSTEM=="usb", DRIVERS=="usb-storage", ATTR{authorized}="0"
即可生效。