systemctl 命令完全指南(四)

2016-12-17 18:30:28 6137

17. 列出所有系统挂载点

# systemctl list-unit-files --type=mount
UNIT FILE STATE
dev-hugepages.mount static
dev-mqueue.mount static
proc-sys-fs-binfmt_misc.mount static
sys-fs-fuse-connections.mount static
sys-kernel-config.mount static
sys-kernel-debug.mount static
tmp.mount disabled

18. 挂载、卸载、重新挂载、重载系统挂载点并检查系统中挂载点状态

# systemctl start tmp.mount
# systemctl stop tmp.mount
# systemctl restart tmp.mount
# systemctl reload tmp.mount
# systemctl status tmp.mount
tmp.mount -TemporaryDirectory
Loaded: loaded (/usr/lib/systemd/system/tmp.mount; disabled)
Active: active (mounted) since Tue2015-04-2817:46:06 IST;2min48s ago
where:/tmp
What: tmpfs
Docs: man:hier(7)
http://www.landui.com/wiki/Software/systemd/APIFileSystems
Process:3908ExecMount=/bin/mount tmpfs /tmp -t tmpfs -o mode=1777,strictatime (code=exited, status=0/SUCCESS)
Apr2817:46:06 tecmint systemd[1]:MountingTemporaryDirectory...
Apr2817:46:06 tecmint systemd[1]: tmp.mount:Directory/tmp to mount over isnot empty, mounting anyway.
Apr2817:46:06 tecmint systemd[1]:MountedTemporaryDirectory.

19. 在启动时激活、启用或禁用挂载点(系统启动时自动挂载)

# systemctl is-active tmp.mount
# systemctl enable tmp.mount
# systemctl disable tmp.mount

20. 在Linux中屏蔽(让它不能启用)或可见挂载点

# systemctl mask tmp.mount
ln -s '/dev/null''/etc/systemd/system/tmp.mount'
# systemctl unmask tmp.mount
rm '/etc/systemd/system/tmp.mount'

提交成功!非常感谢您的反馈,我们会继续努力做到更好!

这条文档是否有帮助解决问题?

非常抱歉未能帮助到您。为了给您提供更好的服务,我们很需要您进一步的反馈信息:

在文档使用中是否遇到以下问题: