In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-04-06 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)06/01 Report--
This article mainly introduces "how to install and use the graphical interface in the CentOS system". In the daily operation, I believe that many people have doubts about how to install and use the graphical interface in the CentOS system. The editor consulted all kinds of materials and sorted out simple and easy-to-use methods of operation. I hope it will be helpful to answer the doubts about "how to install and use the graphical interface in the CentOS system". Next, please follow the editor to study!
1. Group instruction of yum
Yum can install packages in program group mode. Supported software packages can be accessed through the
The code is as follows:
# yum grouplist
I got it. In the group software package
For CentOS 6, Desktop, Desktop Platform, KDE Desktop, and X Window System are the main desktop environments.
For CentOS 7, there are two desktop environments, KDE Plasma Workspaces and Gnome Desktop.
The result returned on CentOS 7 is as follows
Loaded plugins: fastestmirror, langpacks
Loading mirror speeds from cached hostfile
* base: mirrors.usc.edu
* extras: mirror.lug.udel.edu
* updates: mirror.cogentco.com
Available environment groups:
Minimal Install
Compute Node
Infrastructure Server
File and Print Server
Basic Web Server
Virtualization Host
Server with GUI
GNOME Desktop
KDE Plasma Workspaces
Development and Creative Workstation
Installed groups:
Graphical Administration Tools
Legacy UNIX Compatibility
Security Tools
System Administration Tools
Available Groups:
Compatibility Libraries
Console Internet Tools
Development Tools
Scientific Support
Smart Card Support
System Management
Done
The list of software packages is displayed according to the language used by the system, and the simplified Chinese file name is supported. Therefore, it is best to use the above instructions to check before installation. If the system uses simplified Chinese and the installation instructions use English, it may result in errors such as not querying the package. The following installation instructions are all in English.
two。 Install the graphical desktop environment
CENTOS 7
The desktop environment installation package on CentOS 7 has been adjusted to make it easier than before. There are two main camps, KDE and GNOME.
Because there is no time to test, just estimate that the following instructions should be able to complete the task, please pay attention!
To install the KDE desktop environment (using Plasma as the default desktop manager, it's beautiful, see here)
The code is as follows:
# yum groupinstall "KDE Plasma Workspaces"
To install the GNOME environment
The code is as follows:
# yum groupinstall "GNOME Desktop"
The installer automatically resolves the dependencies of the installation package and components.
CENTOS 6
To install the KDE desktop environment, execute the instructions
The code is as follows:
# yum groupinstall "X Window System"KDE Desktop" Desktop
You can install 3 software packages at the same time. Note that because both KDE Desktop and X Window System package names contain spaces between them, they need to be enclosed in quotation marks.
To install the Gnome desktop environment, execute the instructions
The code is as follows:
# yum groupinstall "X Window System"Desktop Platform" Desktop
It is also possible to install three packages at the same time, of which X Window System is a must, whether it is Gnome or KDE.
Since it is a desktop environment, you may also need something such as fonts and management tools, such as
The code is as follows:
# yum-y groupinstall "Graphical Administration Tools"
# yum-y groupinstall "Internet Browser"
# yum-y groupinstall "General Purpose Desktop"
# yum-y groupinstall "Office Suite and Productivity"
# yum-y groupinstall "Graphics Creation Tools"
3. Enable
Start the graphical desktop environment directly from the command line
# startx
This starts the default Gnome or KDE desktop environment. If someone likes to install GNOME and KDE at the same time, please refer to the CentOS documentation for switching methods.
If you want to start to the graphical desktop automatically at startup, you need to modify the startup configuration. Because CentOS 7 started using systemd Manager, it operates differently from previous versions.
CENTOS 7:
In CentOS 7, you can directly use the systemd instruction to modify the startup destination state.
Use,
The code is as follows:
# systemctl get-default
You can query the currently set status. Multi-user.target is equivalent to the previous level 3, the command line terminal, while graphical.target is equivalent to the previous level 5, that is, the graphical interface.
So if you want to set the default startup to the graphical interface, execute
The code is as follows:
# systemctl set-default graphical.target
CENTOS 6, etc.:
Edit / etc/inittab and change id:3:initdefault: to id:5:initdefault:. Please pay attention to the half-corner colon here. ) refer to here.
It will be very convenient to use sed directly.
The code is as follows:
Sed-I's peg id _ lug _ 3 _
After starting the graphical interface, if you want to switch from the graphical interface to the command line interface, you can use Ctrl + Alt + F6 (actually F1 to F6, but they represent different consoles in Linux), or vice versa. Ctrl + Alt + F7 goes back to the graphical interface.
4. Skip the graphical interface when booting
The code is as follows:
# vi / etc/inittab-Edit / etc/inittab file
Find the following statement:
The code is as follows:
# Default runlevel. The runlevels used by RHS are:
# 0-halt (Do NOT set initdefault to this)-- shutdown
# 1-Single user mode-single user mode
# 2-Multiuser, without NFS (The same as 3, if you do not havenetworking)-- Multi-user mode, NFS is not supported
# 3-Full multiuser mode-Multi-user mode
# 4-unused-not used
# 5-X11-graphical interface
# 6-reboot (Do NOT set initdefault to this)-restart
#
Id:5:initdefault:-- the default running level is 5. Just change this to id:3:initdefault:
To start the graphical interface in text mode, you can issue the following command:
The code is as follows:
# startx
At this point, the study on "how to install and use a graphical interface in the CentOS system" is over. I hope to be able to solve your doubts. The collocation of theory and practice can better help you learn, go and try it! If you want to continue to learn more related knowledge, please continue to follow the website, the editor will continue to work hard to bring you more practical articles!
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.