Linux运行级别和相关指令

110 阅读1分钟

1.指定运行级别:

  • (0)0: 关机 (1)1: 单用户(找回丢失密码)
  • (2)2: 多用户状态但没网络 (3)3:多用户有网络
  • (4)用户选择使用系统界面 @(5)5:图形化界面
  • (6)6: 系统重启

2.指令

  • (1)multi- user.target:运行上面的级别3
  • (2)graphical.target:运行上面的级别5
  • (3)显示默认运行级别: systemctl get-default
  • (4)设置默认运行级别: systemctl set- default xx.target