How Cockpit can help you manage your Linux machines more easily

0

Getty Images/iStockphoto

Linux isn’t as difficult as you think…especially on the desktop (where you really don’t have to deal with a lot of admin tasks). But what about the server? Given that you may want to deploy a Linux server in your home or corporate data center, what is it like to administer the open-source operating system in this capacity?

Thanks to a web-based GUI, it’s not as difficult as you might think.

The GUI in question is called Cockpit, a web-based GUI that simplifies a number of Linux tasks so that even new Linux users can have an easier time managing these servers. So whether you are new to Linux or an expert, Cockpit might be the best tool on the market for server administration tasks.

What can Cockpit do for you?

From a well-designed graphical interface, Cockpit allows you to manage elements such as:

  • Network Settings
  • firewall
  • Storage (including RAID and LUKS partitions)
  • Virtual machines
  • Containers
  • System logs
  • Material
  • Software upgrades
  • Performance
  • User accounts
  • Systemd-based services
  • SELinux (on RHEL-based distributions)

You can also access the machine’s terminal window and link multiple Cockpit-enabled servers together to make it easier to manage all your Linux servers from a single interface.

Get the cockpit

Cockpit is installed on all RHEL-based Linux distributions (such as Rocky Linux, AlmaLinux, and CentOS) by default. However, it is not enabled by default. Luckily, to activate Cockpit, just open a terminal window and issue the command:

sudo systemctl enable --now cockpit.socket

If you are using a Debian (or Ubuntu) based Linux distribution, you will first need to install Cockpit with the command:

sudo apt-get install cockpit -y

Once the installation is complete, start and activate Cockpit with:

sudo systemctl enable --now cockpit.socket

Also: The 5 Best Linux Distros for Beginners: You Can Do It

Access to the cockpit

Once Cockpit is installed and the service started, open a web browser and point it to https://SERVER:9090 (where SERVER is the IP address of the hosting server). You will be greeted by the login window where you need to login with a user with sudo privileges.

The Cockpit login window.

The cockpit was successfully installed.

Photo: Jack Wallen

Enable administrative access

If you are logging in as a standard user with sudo privileges, you will need to enable administrative access for that user by clicking Enable Administrative Access when prompted.

The first Cockpit login window.

We need to enable administrative access for our user.

Photo: Jack Wallen

You should now be on the main Cockpit screen, where you can start administering your server.

Added new mods

As you can see above, I have Podman containers included with Cockpit. It is a module that allows you to manage container deployments from Cockpit. There are a number of third-party apps you can install, including:

  • Composer — generates custom images for Fedora, RHEL, and CentOS.
  • 389 Directory Server — web interface for Open SOURCE LDAP.
  • Session recording — record sessions for user interaction with the server.
  • Subscription Manager – manage all RHEL subscriptions.
  • oVirt dashboard – manage virtual machines.
  • ZFS Manager — manages ZFS file systems.
  • File Sharing — Samba and NFS mana shares.
  • Navigator – complete file manager for Cockpit.
  • Benchmark — storage benchmark tool.
  • Software updates — OpenSUSE transactional update.
  • Sensors — lists all available sensors found in a machine.

Let me show you how to install the Navigator module.

Also: Docker 101: Why You Should Use Podman Containers

Install Navigator on an RHEL-Based System

Once done, install the module with the command:

sudo dnf install cockpit-navigator -y

Refresh the Cockpit window and you should see the Navigator entry. Click this entry to display the system directory hierarchy, where you can create new directories, upload files, etc.

The Cockpit Navigator app.

Navigating the file system hierarchy can now be done in Cockpit.

Photo: Jack Wallen

Also: Red Hat Enterprise Linux 9: Integrated Security

Install Navigator on an Ubuntu-Based System

Import the 45drives GPG key with:

wget -qO – https://repo.45drives.com/key/gpg.asc | sudo gpg –dearmor -o /usr/share/keyrings/45drives-archive-keyring.gpg

Also: Ubuntu 22.04: the Linux desktop for work

Next, we add the 45drives repository with the following commands:

cd /etc/apt/sources.list.d
sudo curl -sSL https://repo.45drives.com/lists/45drives.sources -o /etc/apt/sources.list.d/45drives.sources

We can now update apt with:

sudo apt update

Finally, install Navigator with:

sudo apt install cockpit-navigator -y

Also: How to Install Ubuntu Linux (It’s Easy!)

And There you go ! Now you have a much easier way to administer your Linux servers, using a well-designed and maintained web interface. Cockpit is one of the first things I install/enable on my Linux servers, so I can enjoy a much more efficient management tool.

Share.

Comments are closed.