This tutorial will guide you through the process of installing a graphical user interface (GUI) on your Linux server. A GUI provides a visual interface for interacting with your server, making it easier to manage files, install software, and perform other tasks.
Prerequisites
- A Linux server with SSH access
- A root or sudo user account
Installing a GUI on Ubuntu
Ubuntu 16.04/18.04
-
Connect to your server as root via SSH.
-
Create a new user for your GUI login and set a password:
useradd -m NewUserName && passwd NewUserName
- Install the Ubuntu-Desktop GUI:
apt update && apt upgrade -y && apt install ubuntu-desktop -y && init 6
Alternatively, install the Kubuntu-Desktop GUI:
apt update && apt upgrade -y && apt install kubuntu-desktop -y && init 6
Ubuntu 18.10 and later versions
-
Connect to your server as root via SSH.
-
Create a new user for your GUI login and set a password:
useradd -m NewUserName && passwd NewUserName
- Choose from a variety of GUIs using the “tasksel” tool:
apt update && apt upgrade -y && tasksel
-
Select the desired GUI and confirm the installation.
-
Reboot your server to make your GUI accessible via your VPS VNC access or KVM in case of a dedicated server.
Installing a GUI on CentOS
CentOS 6
-
Connect to your server as root via SSH.
-
Create a new user for your GUI login and set a password:
useradd -m NewUserName && passwd NewUserName
- Edit the “/etc/inittab” file to boot to runlevel 5:
nano /etc/inittab
- Change the following line:
id:3:initdefault: -> id:5:initdefault:
-
Save your changes and close the editor by pressing Ctrl+O, Enter, Ctrl+X.
-
Install the GNOME GUI and required software:
yum update -y && yum -y groupinstall "Desktop" "X Window System" "Fonts" && init 6
Alternatively, install the KDE GUI:
yum update -y && yum -y groupinstall "KDE desktop" "X Window System" "Fonts" && init 6
CentOS 7
-
Connect to your server as root via SSH.
-
Create a new user for your GUI login and set a password:
useradd -m NewUserName && passwd NewUserName
- Install the KDE GUI:
yum update -y && yum -y groupinstall "KDE Plasma Workspaces" && ln -sf /lib/systemd/system/runlevel5.target /etc/systemd/system/default.target && init 6
Alternatively, install the GNOME GUI:
yum update -y && yum -y groupinstall "GNOME Desktop" "Graphical Administration Tools" && ln -sf /lib/systemd/system/runlevel5.target /etc/systemd/system/default.target && init 6
Installing a GUI on Debian
Debian 8 and later versions
-
Connect to your server as root via SSH.
-
Create a new user for your GUI login and set a password:
useradd -m NewUserName && passwd NewUserName
- Install the GNOME GUI:
apt update && apt upgrade -y && apt install gnome -y && init 6
Alternatively, install the KDE GUI:
apt update && apt upgrade -y && apt install kde-standard -y && init 6
Additional Notes
-
You can connect to your GUI via VNC or KVM in case of a dedicated server.
-
If you are using a firewall, you will need to open the appropriate ports for VNC or KVM access.
-
For added security, it is recommended to use a strong password for your GUI login.
Conclusion
By following the instructions in this tutorial, you can easily install a graphical user interface on your Server Gigabit’s Linux server. This will make it easier to manage your server and perform a wider range of tasks.