How to Manage Your Linux System with Cockpit

Cockpit Feature

There are many ways to manage the services and resources running on both your system and other systems on your network. They range from various vendor applications to the old standby SSH. However, on certain Linux distributions, there is an excellent web-based tool called Cockpit. Cockpit is an extensible and easy-to-use web application designed to help you manage your Red Hat-based Linux systems, including RHEL, CentOS, and Fedora. This guide will show you how to manage your Linux system with Cockpit.

Note: we are using Fedora for this tutorial, but the instructions will be similar for other distros.

Installing Cockpit

First, make sure your system is up to date. Do that by opening a terminal and typing:

When that command completes, enter the command to install Cockpit via the DNF package manager.

Cockpit is also part of the “Headless Management” software group, so install it from there along with several other tools that to help manage a Fedora workstation or server across the network.

In order to access your Cockpit web console, make sure you allow Cockpit through the system firewall and start the service. To allow Cockpit through the firewall, enter the following command:

You will get a message that says success. Next, start and enable the systemd service. To do that, enter the following command:

You will be able to open up your web browser and type in localhost:9090 and will see the Cockpit Web Console come up on your screen.

The Cockpit Web Console

From here, log in with your typical username and password, and you’ll be greeted with a friendly overview. You can see various information, including your hostname for network communications, system information, resource usage, and various navigation elements. Use this information to look at logs, storage, networking information, and more.

Cockpit Overview

Clicking on Logs brings you to an overview of the various system logs. This can be useful if you’re having issues with a particular program or piece of hardware on a system. For example, if you’re using Fedora on a laptop and have trouble with your Wi-Fi, you can check the Logs page on Cockpit to see if there are any kernel logs from iwlwifi and attempt to correct them.

Cockpit Logs

If you click on Storage, it brings up a page where you can easily monitor the storage devices attached to your system, including both SATA drives and CD/DVD drives. The Storage page of Cockpit is a useful blend of drive activity, partition and device lists, storage logs, and NFS mount management, something difficult to find in any one single tool. Rather than having multiple terminal tabs running to see all of this information, you can just pull up this page in Cockpit.

Cockpit Storage

The next item is Networking, where you can easily manage your network interfaces and firewall, including turning on or off networking interfaces and configuring networking bonds or VLANs. This can be incredibly useful for managing networking on a server or workstation with multiple NICs and server roles, allowing you to quickly and easily lay out all of your NICs in one quickly-accessible spot.

Cockpit Networking

The Accounts tab is easily the simplest. You can manage the accounts on your system. This can be useful if you have a server that multiple administrators or users access and you need to manage their permissions.

Cockpit Accounts

Services is one of the more complex tabs in Cockpit. You can manage all of your system’s services from here. If a service needs to be started in order for something on your server to work, i.e. libvirtd, sshd, or cups, this is where you’d head to start that service. There are other sections on the Services tab, but those are more likely to be edge-use cases that are more advanced than this guide’s scope.

Cockpit Service

Go to Applications to add or remove additional functionality in Cockpit. You can add modules for managing SELinux, QEMU/KVM virtual machines, and even podman containers. This can make it very easy for you to get started with these tools and avoid some of the headache that comes along with learning complex tools for the first time.

Cockpit Applications

Software Updates is a very useful page for managing security and software updates. You can choose to only install security updates, install all updates, and even configure automatic updates. This can be a huge boon for people managing Fedora servers that require somewhat frequent updates. It can also be helpful for people who are choosing to only apply security fixes and not change anything about their other software.

Cockpit Software Updates

Terminal is the final tab under the Host section, and it serves the purpose of giving you access to more granular control over your system. For example, if you work with a piece of software that doesn’t have a Cockpit module, you can still manage it from a friendly web interface without having to jump into an SSH client or terminal on your local system.

Cockpit Terminal

Finally, you have the Dashboard. From the Dashboard you can easily see usage across all of the major resources: CPU, Memory, Network I/O, and Disk I/O. You can also add other servers to this dashboard. Uou can quickly glance at a dashboard to see if one server has high CPU usage compared to the others. It’s incredibly useful for virtual servers as well.

Cockpit Dashboard

Cockpit is a simple and user-friendly way to manage your Linux systems. Multiple Linux servers, physical or virtual, can easily be configured through Cockpit, and multiple different modules can be added to increase the functionality. Now that you’ve learned about Cockpit, make sure to check out our other posts on remote system management to learn how to access your Mac remotely and how to set up remote access on a host with a dynamic IP address.

Related:

2 comments

  1. I have a home file/media server running Ubuntu that I monitor with Cockpit installed on a Win 10 laptop. The Win version is a simple download, same setup with server IP and pwd. Cockpit seems rudimentary at first, the interface is simple and plain but it performs many useful functions. No limitations nagging for paid upgrades, a great GUI based manager.

    The reason I use Linux on our server is I don’t trust Windows and MS’s broken update whether it’s needed or not system with everyone’s videos, photos, documents, etc. I want the server to work all the time. Linux is easy to learn; I have Manjaro on a different laptop (love the KDE Plasma desktop) and overall, it’s more or less the same as Ubuntu; both are similar to Windows.

  2. Absolutely agree with what you said. It seems overly simple, but that’s kind of the beauty of it. It does everything it needs to without being distracting.

    I also agree with your sentiment about updates. It’s a fine line to walk, I understand, but updates that break a system aren’t really updates at all. Linux is very easy to learn, and it’s very easy to learn a lot and have a lot of control.

    Glad you got some use out of the article. If you like KDE Plasma, you should try it on other distros. Fedora and Ubuntu both have versions that come with KDE as the default! Fedora KDE Plasma Spin and Kubuntu, respectively.

Leave a Comment

Yeah! You've decided to leave a comment. That's fantastic! Check out our comment policy here. Let's have a personal and meaningful conversation.