linux硬盘只读模式怎么改

2025-10-20 08:56:32

1、先简单介绍一下mount命令

mount --help查看命令的使用帮助

linux硬盘只读模式怎么改

2、在终端上输入mount 列出当前挂载的硬盘

在硬盘设备的后面会有rw,ro等字符

/dev/dm-1 on /mnt/test type ext3 (rw)

linux硬盘只读模式怎么改

3、如果出现下面这种(ro)的就表示是不可写的

/dev/dm-1 on /mnt/test type ext3 (ro)

linux硬盘只读模式怎么改

4、先简单地了解一下下面将会用到的其它几个命令

umount --hlep的使用帮助

linux硬盘只读模式怎么改

5、还有fuser 命令

fuser -m /mnt/test显示当前使用这个盘符的pid

fuser -mk /mnt/test将会直接kill那个pid

linux硬盘只读模式怎么改

linux硬盘只读模式怎么改

6、具体流程:

先将那个不可写的硬盘先umount掉,如果umount失败,就查看当前使用这个硬盘的用户,关闭用户的会话,umount硬盘,重新mount

大概的命令操作如下

fuser -mk /mnt/test

umount /mnt/test

mount

或者直接使用下面的命令

mount -o rw,remount /mnt/test

linux硬盘只读模式怎么改

声明:本网站引用、摘录或转载内容仅供网站访问者交流或参考,不代表本站立场,如存在版权或非法内容,请联系站长删除,联系邮箱:site.kefu@qq.com。
猜你喜欢