GUIs are nice pieces of software. They often help with a lot of daily tasks. For example, they let you visualize what you're doing on the system, surf the internet, and much more, but they don't belong on servers. The reason for this strong claim comes from the fact that sysadmins shouldn’t be using a server as a desktop, and generally speaking, a server can be administered completely via the command line interface (CLI).
A full-fledged desktop environment is also resource-heavy. It can easily require 2 GB of RAM and three gigabytes or more disk space just to exist. Yes, you can install lightweight GUIs, but again, resources are unnecessarily wasted.
[ You might also enjoy: Balancing Linux security with usability ]
There are other practical issues with a GUI on a server too. To use a GUI, you will probably use SSH X-Server forwarding, which is very slow as SSH encrypts the traffic. There are other ways to manage the server. You can either physically connect to the server (in case of bare metal) or have access to the hypervisor console, which you might or might not be able to, depending on security policies, access, geographic location, and so on.
Who uses a GUI on a server?
Every so often, though, you find that people, especially those coming from different backgrounds, prefer to have a desktop environment installed on their servers as they are not familiar with any shell. However, don't forget that skills can be learned and, after a certain amount of time, those who are administering Linux will find themselves more at home with the GNU/Linux shell.
Of course, visualizing server configurations still helps even the most experienced of us, but RHEL provides Cockpit for that. It is a lightweight browser-based administration tool for Linux.
How do I get rid of the desktop environment?
I have tried many times to eliminate the desktop environment on servers, recommending that administrators use Cockpit. However, it took some time to find a way to cleanly remove GNOME (the default desktop environment on RHEL) without reinstalling the OS.
It turns out that this is possible, but it requires a couple of extra steps.
When you want to learn what is installed on your systems, as usual, DNF comes in handy. Try this command:
$ dnf grouplist
You can see the Installed Environment Groups category. Those groups are there to help manage software collections. Notice the Installed Environment Groups listed below:
As you can see, the Installed Environment Group is Server with GUI. This is the default during a standard installation via the RHEL ISO.
Remove the GUI
You want to install everything you need to replace your GUI-based tooling and then remove the GUI altogether.
As a first step, you need to install the group Minimal install. This will update the dependencies and make sure that the removal of the Server with GUI group won’t break anything.
Afterward, you also need the Server group. This will help enable Cockpit, the admin tool I mentioned earlier.
Use the following steps:
$ dnf groupinstall -y “Minimal Install”
$ dnf groupremove -y “Server with GUI”
$ dnf groupinstall -y “Server”
Finally, you can enable Cockpit with two additional simple steps:
systemctl enable --now cockpit.socket
sudo firewall-cmd --add-service=cockpit --permanent
To learn more about Cockpit and how to use it, take a look at, An introduction to Cockpit, a browser-based administration tool for Linux.
[ Free online course: Red Hat Enterprise Linux technical overview. ]
Wrapping up
In this article, you learned how to cleanly remove a default desktop environment from a RHEL 8 server in favor of Cockpit. This allows you to save resources and still comfortably manage the system with a browser-based software component.
執筆者紹介
Italian-born and Swiss-based Cloud and infrastructure Enthusiast, Linux Users since 1998. Avid traveler, foodie, and die-hard cyclist, if he is not tinkering with a complex computing environment, you can find him in the woods or in the kitchen.
Currently, he is working as a senior consultant helping customers to reach their success.
チャンネル別に見る
自動化
テクノロジー、チームおよび環境に関する IT 自動化の最新情報
AI (人工知能)
お客様が AI ワークロードをどこでも自由に実行することを可能にするプラットフォームについてのアップデート
オープン・ハイブリッドクラウド
ハイブリッドクラウドで柔軟に未来を築く方法をご確認ください。
セキュリティ
環境やテクノロジー全体に及ぶリスクを軽減する方法に関する最新情報
エッジコンピューティング
エッジでの運用を単純化するプラットフォームのアップデート
インフラストラクチャ
世界有数のエンタープライズ向け Linux プラットフォームの最新情報
アプリケーション
アプリケーションの最も困難な課題に対する Red Hat ソリューションの詳細
オリジナル番組
エンタープライズ向けテクノロジーのメーカーやリーダーによるストーリー
製品
ツール
試用、購入、販売
コミュニケーション
Red Hat について
エンタープライズ・オープンソース・ソリューションのプロバイダーとして世界をリードする Red Hat は、Linux、クラウド、コンテナ、Kubernetes などのテクノロジーを提供しています。Red Hat は強化されたソリューションを提供し、コアデータセンターからネットワークエッジまで、企業が複数のプラットフォームおよび環境間で容易に運用できるようにしています。
言語を選択してください
Red Hat legal and privacy links
- Red Hat について
- 採用情報
- イベント
- 各国のオフィス
- Red Hat へのお問い合わせ
- Red Hat ブログ
- ダイバーシティ、エクイティ、およびインクルージョン
- Cool Stuff Store
- Red Hat Summit