1. [root@docker ~]# yum grouplist
    2. Loaded plugins: fastestmirror, langpacks, product-id, search-disabled-repos, subscription-manager
    3. This system is not registered with an entitlement server. You can use subscription-manager to register.
    4. There is no installed groups file.
    5. Maybe run: yum groups mark convert (see man yum)
    6. Loading mirror speeds from cached hostfile
    7. * base: mirrors.aliyun.com
    8. * extras: mirrors.aliyun.com
    9. * updates: mirrors.aliyun.com
    10. Available Environment Groups:
    11. Minimal Install
    12. Compute Node
    13. Infrastructure Server
    14. File and Print Server
    15. Basic Web Server
    16. Virtualization Host
    17. Server with GUI
    18. GNOME Desktop
    19. KDE Plasma Workspaces
    20. Development and Creative Workstation
    21. Available Groups:
    22. Compatibility Libraries
    23. Console Internet Tools
    24. Development Tools
    25. Graphical Administration Tools
    26. Legacy UNIX Compatibility
    27. Scientific Support
    28. Security Tools
    29. Smart Card Support
    30. System Administration Tools
    31. System Management
    32. Done
    33. [root@docker ~]#
    1. yum -y groupinstall "Server with GUI"

    查看默认启动和设置启动级别

    1. [root@docker ~]# systemctl get-default
    2. multi-user.target
    3. [root@docker ~]# cat /etc/inittab
    4. # inittab is no longer used when using systemd.
    5. #
    6. # ADDING CONFIGURATION HERE WILL HAVE NO EFFECT ON YOUR SYSTEM.
    7. #
    8. # Ctrl-Alt-Delete is handled by /usr/lib/systemd/system/ctrl-alt-del.target
    9. #
    10. # systemd uses 'targets' instead of runlevels. By default, there are two main targets:
    11. #
    12. # multi-user.target: analogous to runlevel 3
    13. # graphical.target: analogous to runlevel 5
    14. #
    15. # To view current default target, run:
    16. # systemctl get-default
    17. #
    18. # To set a default target, run:
    19. # systemctl set-default TARGET.target
    20. #
    21. [root@docker ~]#

    启动图形界面

    1. startx