By default, public Linux images from Alibaba Cloud are command-line only to ensure server performance and stability. However, for certain use cases, installing a graphical user interface (GUI) can enhance the user experience and operational efficiency.
Applicability and risk assessment
Before you begin, confirm the following limitations and risks.
Operating system compatibility: Alibaba Cloud Linux, the official operating system of Alibaba Cloud, does not support GUI installation.
Remote connection tool limitations: After you install a GUI, VNC connections through the Elastic Compute Service (ECS) console display the graphical interface by default. Workbench and Session Manager can continue to be used for command-line operations.
Performance impact: A GUI places a constant load on CPU and memory resources, typically an additional 1 GiB to 2 GiB of memory. This resource consumption can cause slower response times on low-specification instances. Install a GUI only for specific scenarios, such as automated testing or graphics rendering. For routine server management, use command-line tools.
Quick selection guide
Select a desktop environment based on your instance specifications and requirements. A lighter desktop environment reduces resource consumption.
Desktop Environment (DE) | Resource Usage (Memory) | Recommended Minimum Instance Specifications |
Low (approx. 500 MB to 800 MB) | 2 vCPU, 2 GiB | |
Medium (approx. 800 MB to 1.2 GiB) | 2 vCPU, 4 GiB | |
High (approx. 1.5 GiB or more) | 4 vCPU, 8 GiB |
Installation guide
Create a snapshot manually of the instance's system disk before you begin. This allows you to restore the instance if an unexpected issue occurs.
Install the XFCE desktop on Ubuntu 18/20/22/24
Update the package list and installed packages.
sudo apt update && sudo apt upgrade -yInstall the XFCE desktop environment, its related utilities, and the LightDM display manager.
sudo apt install -y xfce4 xfce4-goodies lightdm lightdm-gtk-greeterLightDM is a lightweight display manager that loads the logon window, authenticates the user, and starts the desktop session when the system starts.
Restart the instance.
sudo rebootAfter the instance restarts, reconnect by using ECS console VNC.
The XFCE login screen appears if the installation is successful.
Ubuntu does not allow the
rootuser to log in to a graphical session by default. Create a non-root user for desktop sessions and grant sudo privileges as needed.
Remove the graphical interface
Install the GNOME desktop on Anolis 8/CentOS Stream
Update all installed packages.
sudo dnf update -yInstall the GNOME desktop environment.
sudo dnf groupinstall "Server with GUI" -yThe "Server with GUI" package group includes GNOME and other common graphical tools.
Set the system to boot into the graphical target by default.
sudo systemctl set-default graphical.targetRestart the instance to apply the changes.
sudo rebootAfter the instance restarts, reconnect by using ECS console VNC. At the GNOME login screen, enter your instance credentials to access the desktop.
Remove the graphical interface
Install the MATE desktop on CentOS 7/8
CentOS 7/8 has reached its End of Life (EOL). Official software repositories are no longer available from the CentOS project. Continued use poses security risks, and package installation may fail.
Update all installed packages.
sudo yum -y upgradeInstall the MATE desktop environment and the underlying X Window System.
sudo yum groups install "X Window System" sudo yum groups install "MATE Desktop"Set the system to boot into the graphical target by default.
sudo systemctl set-default graphical.targetRestart the instance.
sudo reboot
Remove the graphical interface
Best practices for production
If you use a GUI in a production environment, follow these best practices.
Resource planning: Allocate sufficient CPU and memory for your chosen desktop environment. Continuously monitor resource utilization by viewing instance monitoring information and upgrade the instance configuration if necessary.
Security hardening:
Principle of least privilege: Create a dedicated non-root user for GUI login. Avoid operating the desktop directly as root to minimize security risks.
System updates: Regularly run
sudo dnf updateorsudo apt upgradeto patch security vulnerabilities in the desktop environment and the underlying system.


