How to start the graphical interface in centos?
How to start the graphical interface in centos: first install the complete set of software packages through the yum group command; then install the graphical desktop environment through KDE; finally open the graphical interface, the code is [[root@bogon ~] # init 5].
How to start the graphical interface in centos:
1. yum group command
yum can install a complete set of software packages in program group mode. Supported software packages can be queried through,
# yum grouplist
. In the group software package, Desktop, Desktop Platform, KDE Desktop, and X Window System are the main desktop environments.
The software package list is displayed according to the language used by the system, and simplified Chinese file names are supported. Therefore, it is best to use the above command to check before installation. If the system uses Simplified Chinese and the installation instructions use English, it may cause errors such as the software package cannot be found. The installation instructions below are all in English.
2. Graphical desktop environment
To install the KDE desktop environment, execute the command,
# yum groupinstall "X Window System" "KDE Desktop" Desktop
, and 3 software packages are installed at the same time. Note that because both KDE Desktop and X Window System package names contain spaces, they need to be enclosed in quotation marks.
To install the Gnome desktop environment, execute the command,
# yum groupinstall "X Window System" "Desktop Platform" Desktop
, and 3 software packages are installed at the same time, of which X Window System is necessary, whether it is Gnome or KDE.
Since it is a desktop environment, you may also need fonts, management tools, etc., such as,
# 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
from the command line Start the graphical desktop environment directly,
# startx
This will start the default Gnome or KDE desktop environment. If someone likes to install Gnome and KDE at the same time, you can refer to the CentOS documentation for switching methods.
If you want to automatically boot to the graphical desktop at startup, you need to modify the startup configuration. Because CentOS 7 starts using the systemd manager, its operation is different from previous versions.
Centos6.x
1, Close the graphical interface:
[root@bogon ~]# init 3
// Close the graphical interface (XServer service will also be closed)
2. Open the graphical interface:
[root@bogon ~]# init 5
or
[root@bogon ~]# startx
//Enter the first graphical interface (if there are multiple)
3. When booting, X Window is not entered by default:
[root@bogon ~]# vim /etc/inittab
Find id:5:initdefault:
Change to id: 3:initdefault:
If the permissions are not enough, switch to the root account to modify it
In CentOS 7, you can directly use the systemd command to modify the startup destination state.
Used,
# systemctl get-default
can query the currently set status. multi-user.target is equivalent to the previous level 3, which is the command line terminal; and graphical.target is equivalent to the previous level 5, which is the graphical interface.
So if you want to set the default startup to the graphical interface, execute,
# systemctl set-default graphical.target
Related learning recommendations: centos tutorial
The above is the detailed content of How to start the graphical interface in centos?. For more information, please follow other related articles on the PHP Chinese website!

Hot AI Tools

Undresser.AI Undress
AI-powered app for creating realistic nude photos

AI Clothes Remover
Online AI tool for removing clothes from photos.

Undress AI Tool
Undress images for free

Clothoff.io
AI clothes remover

AI Hentai Generator
Generate AI Hentai for free.

Hot Article

Hot Tools

Notepad++7.3.1
Easy-to-use and free code editor

SublimeText3 Chinese version
Chinese version, very easy to use

Zend Studio 13.0.1
Powerful PHP integrated development environment

Dreamweaver CS6
Visual web development tools

SublimeText3 Mac version
God-level code editing software (SublimeText3)

Hot Topics



Improve HDFS performance on CentOS: A comprehensive optimization guide to optimize HDFS (Hadoop distributed file system) on CentOS requires comprehensive consideration of hardware, system configuration and network settings. This article provides a series of optimization strategies to help you improve HDFS performance. 1. Hardware upgrade and selection resource expansion: Increase the CPU, memory and storage capacity of the server as much as possible. High-performance hardware: adopts high-performance network cards and switches to improve network throughput. 2. System configuration fine-tuning kernel parameter adjustment: Modify /etc/sysctl.conf file to optimize kernel parameters such as TCP connection number, file handle number and memory management. For example, adjust TCP connection status and buffer size

CentOS will be shut down in 2024 because its upstream distribution, RHEL 8, has been shut down. This shutdown will affect the CentOS 8 system, preventing it from continuing to receive updates. Users should plan for migration, and recommended options include CentOS Stream, AlmaLinux, and Rocky Linux to keep the system safe and stable.

The CentOS shutdown command is shutdown, and the syntax is shutdown [Options] Time [Information]. Options include: -h Stop the system immediately; -P Turn off the power after shutdown; -r restart; -t Waiting time. Times can be specified as immediate (now), minutes ( minutes), or a specific time (hh:mm). Added information can be displayed in system messages.

The key differences between CentOS and Ubuntu are: origin (CentOS originates from Red Hat, for enterprises; Ubuntu originates from Debian, for individuals), package management (CentOS uses yum, focusing on stability; Ubuntu uses apt, for high update frequency), support cycle (CentOS provides 10 years of support, Ubuntu provides 5 years of LTS support), community support (CentOS focuses on stability, Ubuntu provides a wide range of tutorials and documents), uses (CentOS is biased towards servers, Ubuntu is suitable for servers and desktops), other differences include installation simplicity (CentOS is thin)

Complete Guide to Checking HDFS Configuration in CentOS Systems This article will guide you how to effectively check the configuration and running status of HDFS on CentOS systems. The following steps will help you fully understand the setup and operation of HDFS. Verify Hadoop environment variable: First, make sure the Hadoop environment variable is set correctly. In the terminal, execute the following command to verify that Hadoop is installed and configured correctly: hadoopversion Check HDFS configuration file: The core configuration file of HDFS is located in the /etc/hadoop/conf/ directory, where core-site.xml and hdfs-site.xml are crucial. use

Backup and Recovery Policy of GitLab under CentOS System In order to ensure data security and recoverability, GitLab on CentOS provides a variety of backup methods. This article will introduce several common backup methods, configuration parameters and recovery processes in detail to help you establish a complete GitLab backup and recovery strategy. 1. Manual backup Use the gitlab-rakegitlab:backup:create command to execute manual backup. This command backs up key information such as GitLab repository, database, users, user groups, keys, and permissions. The default backup file is stored in the /var/opt/gitlab/backups directory. You can modify /etc/gitlab

Steps to configure IP address in CentOS: View the current network configuration: ip addr Edit the network configuration file: sudo vi /etc/sysconfig/network-scripts/ifcfg-eth0 Change IP address: Edit IPADDR= Line changes the subnet mask and gateway (optional): Edit NETMASK= and GATEWAY= Lines Restart the network service: sudo systemctl restart network verification IP address: ip addr

When configuring Hadoop Distributed File System (HDFS) on CentOS, the following key configuration files need to be modified: core-site.xml: fs.defaultFS: Specifies the default file system address of HDFS, such as hdfs://localhost:9000. hadoop.tmp.dir: Specifies the storage directory for Hadoop temporary files. hadoop.proxyuser.root.hosts and hadoop.proxyuser.ro
