Home Operation and Maintenance CentOS How to start the graphical interface in centos?

How to start the graphical interface in centos?

Jul 06, 2020 pm 03:53 PM
centos graphic interface

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?

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
Copy after login

. 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
Copy after login

, 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
Copy after login

, 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"
Copy after login

3. Enable

from the command line Start the graphical desktop environment directly,

# startx
Copy after login

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
Copy after login

// Close the graphical interface (XServer service will also be closed)

2. Open the graphical interface:

   [root@bogon ~]# init 5
Copy after login

or

   [root@bogon ~]# startx
Copy after login

//Enter the first graphical interface (if there are multiple)

3. When booting, X Window is not entered by default:

   [root@bogon ~]# vim /etc/inittab
Copy after login

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
Copy after login

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
Copy after login

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!

Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn

Hot AI Tools

Undresser.AI Undress

Undresser.AI Undress

AI-powered app for creating realistic nude photos

AI Clothes Remover

AI Clothes Remover

Online AI tool for removing clothes from photos.

Undress AI Tool

Undress AI Tool

Undress images for free

Clothoff.io

Clothoff.io

AI clothes remover

AI Hentai Generator

AI Hentai Generator

Generate AI Hentai for free.

Hot Tools

Notepad++7.3.1

Notepad++7.3.1

Easy-to-use and free code editor

SublimeText3 Chinese version

SublimeText3 Chinese version

Chinese version, very easy to use

Zend Studio 13.0.1

Zend Studio 13.0.1

Powerful PHP integrated development environment

Dreamweaver CS6

Dreamweaver CS6

Visual web development tools

SublimeText3 Mac version

SublimeText3 Mac version

God-level code editing software (SublimeText3)

How to optimize CentOS HDFS configuration How to optimize CentOS HDFS configuration Apr 14, 2025 pm 07:15 PM

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 stops maintenance 2024 Centos stops maintenance 2024 Apr 14, 2025 pm 08:39 PM

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.

Centos shutdown command line Centos shutdown command line Apr 14, 2025 pm 09:12 PM

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.

Difference between centos and ubuntu Difference between centos and ubuntu Apr 14, 2025 pm 09:09 PM

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)

How to check CentOS HDFS configuration How to check CentOS HDFS configuration Apr 14, 2025 pm 07:21 PM

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

What are the backup methods for GitLab on CentOS What are the backup methods for GitLab on CentOS Apr 14, 2025 pm 05:33 PM

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

Centos configuration IP address Centos configuration IP address Apr 14, 2025 pm 09:06 PM

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

What files do you need to modify in HDFS configuration CentOS? What files do you need to modify in HDFS configuration CentOS? Apr 14, 2025 pm 07:27 PM

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

See all articles