The GUI Way of Using Linux (How To Use Cockpit on CentOS)

whotarusharora

Tarush Arora

Posted on June 24, 2024

The GUI Way of Using Linux (How To Use Cockpit on CentOS)

Have you every thought of executing Linux operations without the command line? Maybe not. But, now there’s a way to do that. You can use the Cockpit package for this purpose, which is extremely helpful for system administrators and server monitoring and maintenance teams.

You can get the info about cockpit on the official website. But, the most convenient way to configure it is here in this blog. So, without wasting any second, let’s start with the practical.

The Cockpit Configuration Procedure

We are going to perform this practical on CentOS operating system, a distribution of the Linux, developed by RedHat enterprises. In numerous enterprise networks, it gets utilized as the primary server OS. So, it’s going to be beneficial for sure.

Additionally, the entire procedure is divided into three phases. The first phase deals with download and installation of the cockpit package. Further, the phase two and three deals with the configuration and accessing the GUI-based Linux interface.

So, let’s get started.

Phase 1: Cockpit Download and Installation

Before, we dive into the practical, ensure to look at the snippets simultaneously for better understanding.

We are going to configure cockpit as a root server. So, we have ensured that, system is accessed as root by using the command whoami.

whoami

There can be a possibility that cockpit service package is already installed on your CentOS system. To find it out, use the command rpm -qa | grep cockpit. If the package would be available, you’ll see it in the list.

In our case, it’s not available.

Checking package availability

To install the cockpit package, use the command: yum install cockpit -y

The command will start the download and installation of the cockpit package on your CentOS operating system.

Installing cockpit

After the successful installation, you will see a output as below.

Installed

Now, again check the cockpit package availability to verify its installation

Run the command: rpm -qa | grep cockpit

Installation Verification

Here, the first phase ends. Now, move to the second one.

Phase 2: Enabling the Cockpit Service

You have to use the classic method to enable the cockpit service, which is using the systemctl.

Firstly, check the status of the services through command: systemctl status cockpit

As you can see, currently the service is inactive.

Cockpit state

To make the service active, run command: systemctl start cockpit

However, if you want this service to run automatically with every boot, use the command: systemctl enable cockpit

Cockpit enable

After starting the service, check the status: systemctl status cockpit

As you can see, this time the service is running on our Linux machine.

Cockpit running

Here, our second phase ends. Move to the third one now.

Phase 3: Accessing the Linux System (GUI-based)

Before you access the GUI-based interface, you should know about the URL for accessing Linux machine through cockpit.

URL: http:// IP of your machine:9090

So, to fulfil the demand of the URL, run the ifconfig command to view your IP address. In our case, it’s 192.168.1.6.

IP

Now, go to your web browser and use the URL, just like the snippet below. Enter the URL and hit enter.

Browser

Once you hit enter, a warning can be showed to you. You have to accept the risk and move forward to view the following login interface.

However, if even after accepting the risk, you didn’t view the interface, go to Linux machine and disable the firewall using command: systemctl disable firewalld

(Note: Do not disable firewall in production environment)

Following it, again enter the URL and this time you’ll absolutely see the interface. Now, put your username and password of the Linux machine and hit the Log in button.

Login Interface

As a result, you will see the cockpit interface or the GUI-interface of your Linux machine. Now, you can execute all core operations without commands with utmost convenience.

Final Interface

Here, the third phase ends and also the practical procedure. Explore the interface and have fun with Linux GUI.

Concluding Up

Nothing much to write here, as you already know how to use cockpit. For any further query or question, you can write a comment and expect me to get back to you within a week. Also, you can suggest topics and I would try to provide you the desired content on them.

Keep supporting.

💖 💪 🙅 🚩
whotarusharora
Tarush Arora

Posted on June 24, 2024

Join Our Newsletter. No Spam, Only the good stuff.

Sign up to receive the latest update from our blog.

Related