How Cockpit can help you more easily manage your Linux machines
Linux isn’t nearly as hard as you think… especially on the desktop (where you really don’t have to take care of many admin tasks). But what about on the server? Given you might want to deploy a Linux server either in your home or your business data center, what’s it like to administer the open-source operating system in that capacity?
Thanks to a web-based GUI, it’s not nearly as hard as you think.
The GUI in question is called Cockpit, a web-based graphical interface that simplifies a number of Linux tasks such that even those new to Linux can have an easier time managing those servers. So whether you’re new to Linux or an expert, Cockpit might be the best tool on the market for server administration duties.
What can Cockpit do for you?
From within a well-designed graphical interface, Cockpit allows you to manage things like:
- Network settings
- Firewall
- Storage (including RAID and LUKS partitions)
- Virtual machines
- Containers
- System logs
- Hardware
- 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 of your Linux servers from a single interface.
Getting Cockpit
Cockpit is installed on all RHEL-based Linux distros (such as Rocky Linux, AlmaLinux, and CentOS) by default. However, it’s not enabled out of the box. Fortunately, enabling Cockpit is just a matter of opening a terminal window and issuing the command:
sudo systemctl enable --now cockpit.socket
If you’re using a Debian (or Ubuntu) based Linux distribution, you will have to first install Cockpit with the command:
sudo apt-get install cockpit -y
Once the installation completes, start and enable Cockpit with:
sudo systemctl enable --now cockpit.socket
Also: The 5 best Linux distros for beginners: You can do this
Accessing Cockpit
With Cockpit 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 must log in with a user that has sudo privileges.
Turn on Administrative Access
If you log on as a standard user with sudo privileges, you’ll need to enable administrative access for that user by clicking Turn on Administrative Access when prompted.
You should now find yourself on the main Cockpit screen, where you can start administering your server.
Adding new modules
As you can see above, I have Podman containers included with Cockpit. That’s a module that allows you to manage container deployments from within Cockpit. There are a number of third-party applications you can install, including:
- Composer — generate custom images for Fedora, RHEL, and CentOS.
- 389 Directory Server — web-based 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 — manage ZFS file systems.
- File Sharing — mana Samba and NFS shares.
- Navigator — full-featured file manager for Cockpit.
- Benchmark — storage benchmark tool.
- Software Updates — transactional update from OpenSUSE.
- Sensors — list all available sensors found in a machine.
Let me show you how to install the Navigator module.
Also: Docker 101: Why you should be using Podman containers
Install Navigator on an RHEL-based system
Once that completes, install the module with the command:
sudo dnf install cockpit-navigator -y
Refresh the Cockpit window and you should see the Navigator entry. Click that entry to reveal the directory hierarchy for the system, where you can create new directories, upload files, and more.
Also: Red Hat Enterprise Linux 9: Security baked in
Install Navigator on a 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! You now have a much easier means of administering your Linux servers, with the help of a well-designed and maintained web-based 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.
For all the latest Technology News Click Here
For the latest news and updates, follow us on Google News.