您可以使用gnome-volume-manager
自动挂载。您可以使用进行一些重新配置gnome-volume-properties
。
屏幕截图
如果您处于运行级别3,我不认为这是一个选择。但是,您可以udev
以类似的方式哄骗您进行安装。
1.添加一个文件automount.rules
中/etc/udev/rules.d
2.将以下行添加到automount.rules
自动安装规则
# automounting usb flash drives
# umask is used to allow every user to write on the stick
# we use --sync in order to enable physical removing of mounted memory sticks -- this is OK for fat-based sticks
# I don't automount sda since in my system this is the internal hard drive
# depending on your hardware config, usb sticks might be other devices than sdb*
ACTION=="add",KERNEL=="sdb*", RUN+="/usr/bin/pmount --sync --umask 000 %k"
ACTION=="remove", KERNEL=="sdb*", RUN+="/usr/bin/pumount %k"
ACTION=="add",KERNEL=="sdc*", RUN+="/usr/bin/pmount --sync --umask 000 %k"
ACTION=="remove", KERNEL=="sdc*", RUN+="/usr/bin/pumount %k"
3.重新加载udev规则:
udevadm control --reload-rules
gnome-disk-utility
我找到了新的名字 gnome-volume-manager
BTW。它在CentOS6中称为gnome-disk-utility,我刚刚确认RPM在默认的yum仓库中。
这个U&L Q让我明白了:在全新安装的Debian 6.0中插入USB存储设备时,并不会自动安装它。
执行以下命令找到它:
$ yum search gnome-disk-utility*
gnome-disk-utility-devel.i686 : Development files for gnome-disk-utility-libs
gnome-disk-utility-devel.x86_64 : Development files for gnome-disk-utility-libs
gnome-disk-utility-ui-devel.i686 : Development files for gnome-disk-utility-ui-libs
gnome-disk-utility-ui-devel.x86_64 : Development files for gnome-disk-utility-ui-libs
gnome-disk-utility.x86_64 : Disk management application
gnome-disk-utility-libs.i686 : Shared libraries used by Palimpsest
gnome-disk-utility-libs.x86_64 : Shared libraries used by Palimpsest
gnome-disk-utility-ui-libs.i686 : Shared libraries used by Palimpsest
gnome-disk-utility-ui-libs.x86_64 : Shared libraries used by Palimpsest
参考文献
How do I achieve automatic mounting when this USB device with known UUID is plugged in
你的意思,你只需要挂载这个特定的USB驱动器?还是有关系吗?我已经发布了一个更通用的答案,该答案将自动安装大多数USB存储设备,但是我不确定这就是您想要的。