deepin25磐石系统临时关闭方法[2025]
使用deepin-immutable-writable命令,可用-h查询具体命令规则如下:
~$ deepin-immutable-writable -h
This tool is used to manage writable directories. you can use it to get status and enable/disable writable directories.
Usage:
deepin-immutable-writable [flags]
deepin-immutable-writable [command]
Available Commands:
disable Disable writable.
enable Enable writable.
help Help about any command
set Set writable config.
status Get writable config status.
Flags:
-h, --help help for deepin-immutable-writable
-j, --json output in json format
-r, --rootdir string set root dir (default "/")
Use "deepin-immutable-writable [command] --help" for more information about a command.
切换磐石系统开关需要重启生效,开关命令主要是这两条。
sudo deepin-immutable-writable enable # 关闭磐石系统
sudo deepin-immutable-writable disable # 开启磐石系统
可以额外加-d标志指定磐石保护范围(该路径下文件是否可写),用-h查询命令规则如下:
~$ deepin-immutable-writable enable -h
Enable writable.
Usage:
deepin-immutable-writable enable [flags]
Examples:
deepin-immutable-writable enable -c -a
Flags:
-a, --all Set writable layer for all directories
-C, --clean-data Clean data modified during the entire service opening period, automatically set to true when clear-after-reboot is true
-c, --clear-after-reboot This variable controls whether the writable layer needs to be cleaned after reboot
-d, --dirs strings Set writable targets, if not set, set /usr to writable (default [/usr])
-h, --help help for enable
-y, --yes Automatic yes to prompts
Global Flags:
-j, --json output in json format
-r, --rootdir string set root dir (default "/")
deepin-immutable-ctl命令也可以用,而且不需要重启,适合临时写入和修改,用-h查询命令规则如下:
~$ deepin-immutable-ctl -h
This tool can be used to install extended applications, configure writable directories, snapshot management and other functions
Usage:
deepin-immutable-ctl [flags]
deepin-immutable-ctl [command]
Available Commands:
admin Manage a host immutable system booted with ostree
help Help about any command
snapshot Manage snapshots in the system.
upgrade Upgrade system.
Flags:
-h, --help help for deepin-immutable-ctl
-s, --immutable-status Check the system if the immutable system
-j, --json Show command output in JSON format
-v, --verbose Show verbose output
-w, --wait Wait for the lock file to be released
Use "deepin-immutable-ctl [command] --help" for more information about a command.
在进行需要写入或修改的操作,只需要拼接两段命令:
sudo deepin-immutable-ctl admin exec -- 要运行的命令
或者进入临时可写的管理员环境,然后再进行操作:
sudo deepin-immutable-ctl admin exec -- /bin/bash
写完后用exit退出管理员环境:
exit
————————————————
版权声明:本文为CSDN博主「和煦流风」的原创文章,遵循CC 4.0 BY-SA版权协议,转载请附上原文出处链接及本声明。
原文链接:https://blog.csdn.net/weixin_44126279/article/details/152458261

浙公网安备 33010602011771号