ubuntu 如何開機預設run level

這篇就只是稍微筆記一下 要怎麼設定ubuntu開機預設的run level

systemctl set-default "你要的level"

舉例:
systemctl set-default multi-user.target  #這是把開機預設的level調成純文字介面
systemctl set-default graphical.target   #這是把開機預設的level調成GUI介面

-------------------------------------------------------------------------------------------------

可以用下面這個指令來看還有哪些runlevel

systemctl list-units --type target

-------------------------------------------------------------------------------------------------
UNIT                  LOAD   ACTIVE SUB    DESCRIPTION
basic.target          loaded active active Basic System
cryptsetup.target     loaded active active Local Encrypted Volumes
getty.target          loaded active active Login Prompts
local-fs-pre.target   loaded active active Local File Systems (Pre)
local-fs.target       loaded active active Local File Systems
multi-user.target     loaded active active Multi-User System
network-online.target loaded active active Network is Online
network-pre.target    loaded active active Network (Pre)
network.target        loaded active active Network
nss-lookup.target     loaded active active Host and Network Name Lookups
paths.target          loaded active active Paths
remote-fs.target      loaded active active Remote File Systems
slices.target         loaded active active Slices
sockets.target        loaded active active Sockets
sound.target          loaded active active Sound Card
swap.target           loaded active active Swap
sysinit.target        loaded active active System Initialization
time-sync.target      loaded active active System Time Synchronized
timers.target         loaded active active Timers

LOAD   = Reflects whether the unit definition was properly loaded.
ACTIVE = The high-level unit activation state, i.e. generalization of SUB.
SUB    = The low-level unit activation state, values depend on unit type.

19 loaded units listed. Pass --all to see loaded but inactive units, too.
To show all installed unit files use 'systemctl list-unit-files'.

留言

這個網誌中的熱門文章

centos7 架設 snort IDS (版本2.9.13)

在debian10 安裝 docker 以及 Logon Tracer