禁用 Ubuntu 自动挂载功能

本文介绍如何在Ubuntu不同版本中禁用系统自动挂载U盘或移动硬盘的功能。通过使用gconf-editor或dconf-editor编辑器,用户可以轻松地关闭自动挂载和自动打开设备的设置。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

在Ubuntu 10.04中,系统发现U盘、移动硬盘,只是一个提示,需要用户到“计算机”中打开U盘。
但是10.10中只要U盘、移动硬盘一插入电脑。系统就直接打开U盘、移动硬盘了。
如何修改才能使系统不自动打开U盘、移动硬盘,而是由用户到计算机中双击U盘、移动硬盘磁盘打开。

下面就把我自己的做法说一下:

在终端输入:

gconf-editor

在出来的界面中依次找到:
/apps/nautilus/preferences/media_automount
/apps/nautilus/preferences/media_automount_open

这两个选项,把勾勾去掉就可以了,根据里面的描述:
第一个选项是是否自动挂载,第二个是是否自动打开。

Ubuntu 11.10(及以上)


If there is a line in /etc/fstab related to that drive, remove it.

The file is read only for all users other that root.

To edit it use the command gksu gedit /etc/fstab, but make a copy of the file before editing, and do not touch nothing other than removing that line.

To disable USB automount in Ubuntu 11.10 (with Gnome 3), launch dconf-editor (package dconf-tools) and uncheck the following entries:

org/gnome/desktop/media-handling/automount
org/gnome/desktop/media-handling/automount-open
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值