systemd-logind.service什么时候被调用
时间: 2023-01-30 18:31:31 浏览: 68
systemd-logind.service 在以下情况下会被调用:
1. 在系统启动时,systemd 启动这个服务
2. 当某个用户登录或注销时,systemd 会调用这个服务
3. 当某个会话被创建或销毁时,systemd 会调用这个服务
4. 当设备被挂载或卸载时,systemd 会调用这个服务
systemd-logind.service 主要负责管理用户登录、会话和设备,它是在系统中非常重要的服务。
相关问题
basic.target是怎样调用systemd-logind.service的?
systemd-logind.service 的 basic.target 依赖关系可以通过 systemctl 命令的 --type=target 选项来查看。例如,可以使用以下命令来查看 basic.target 的依赖关系:
systemctl --type=target --all
您也可以使用以下命令来查看单独的 basic.target 的依赖关系:
systemctl --type=target --all basic.target
要调用 basic.target,您可以使用以下命令:
systemctl start basic.target
这将启动 basic.target 中列出的所有服务和目标。
注意:如果您尝试在没有指定 --type 选项的情况下调用 basic.target,则会出现错误,因为 basic.target 不是单独的服务,而是目标(即组合多个服务的类型)。因此,在调用 basic.target 时,必须指定 --type=target 选项。
是不是 basic.target调用了systemd-logind.service
是的,basic.target 会调用 systemd-logind.service。在系统启动过程中,basic.target 是一个关键的系统服务,它会调用多个其他的服务,包括 systemd-logind.service。在 basic.target 被调用后,系统就可以开始提供基本的服务,比如用户登录、网络连接等。