- CompTIA Linux+ Certification Guide
- Philip Inshanally
- 520字
- 2021-08-13 15:49:48
Introduction to boot targets
The concept of boot targets is a whole new ball game. Boot targets are used when working with systemd. We can see increased performance, because only requests for a particular socket are started as needed. Also, systemd emulates init for compatibility, while in the background systemd is doing the work. When we use boot targets, we work with units. For a given boot target, a number of daemons reside. Let's see the available boot targets in an Ubuntu distribution:
root@ubuntu:/home/philip# systemctl list-units --type target
UNIT LOAD ACTIVE SUB DESCRIPTION
basic.target loaded active active Basic System
cryptsetup.target loaded active active Encrypted Volumes
getty.target loaded active active Login Prompts
graphical.target loaded active active Graphical Interface
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.target loaded active active Network
nss-user-lookup.target loaded active active User and Group Name Lookups
paths.target loaded active active Paths
remote-fs-pre.target loaded active active Remote File Systems (Pre)
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'.
root@ubuntu:/home/philip#
From the preceding output, only the targets that are currently loaded will be displayed. The graphical.target is similar to runlevel 5 in init. To see all of the boot targets, we would do this:
root@ubuntu:/home/philip# systemctl list-units --type target --all
UNIT LOAD ACTIVE SUB DESCRIPTION
basic.target loaded active active Basic System
cryptsetup.target loaded active active Encrypted Volumes
emergency.target loaded inactive dead Emergency Mode
failsafe-graphical.target loaded inactive dead Graphical failsafe fallback
final.target loaded inactive dead Final Step
getty.target loaded active active Login Prompts
graphical.target loaded active active Graphical Interface
halt.target loaded inactive dead Halt
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 inactive dead Network is Online
network-pre.target loaded inactive dead Network (Pre)
network.target loaded active active Network
nss-user-lookup.target loaded active active User and Group Name Lookups
paths.target loaded active active Paths
reboot.target loaded inactive dead Reboot
remote-fs-pre.target loaded active active
From the preceding output, we can see the boot targets that are active and also those that are inactive.
Now, let's say we want to see the actual daemons associated with a given target. We would run the following command:
root@ubuntu:/home/philip# systemctl list-dependencies graphical.target
From the preceding output, we can see a number of daemons in graphical.target. One such daemon is the NetworkManager.service, which is used for networking within our system. The way to read this would be:
- Green circle: Indicates that the service is currently running
- Red circle: Indicates that the service is not presently running
- Microsoft Dynamics CRM Customization Essentials
- 影視后期制作(Avid Media Composer 5.0)
- MCSA Windows Server 2016 Certification Guide:Exam 70-741
- 數據庫原理與應用技術學習指導
- 機艙監測與主機遙控
- Maya 2012從入門到精通
- Windows內核原理與實現
- Blender Compositing and Post Processing
- 菜鳥起飛系統安裝與重裝
- 計算機組成與操作系統
- 漢字錄入技能訓練
- PHP求職寶典
- Kubernetes on AWS
- 51單片機應用程序開發與實踐
- 教育創新與創新人才:信息技術人才培養改革之路(四)