Skip navigation
Pilot and copilot in cockpit Alamy

How To Install and Use the Cockpit Linux Management Console

This guide covers key Cockpit features, step-by-step instructions on how to install and configure Cockpit on various Linux distributions, and much more.

Cockpit is a software application designed for the administration of Linux servers. It offers a user-friendly GUI that sysadmins can use for monitoring, managing, and troubleshooting Linux servers and systems.

Cockpit serves as a centralized platform for server management activities, providing accessibility to a range of tasks without the need for repeated command-line interactions. As such, Cockpit can be helpful for sysadmins who may not be well-versed in Linux command-line operations but are tasked with managing and monitoring Linux servers. Additionally, the software can help organizations streamline their server administration processes.

11 Key Features of Cockpit

Cockpit boasts a range of noteworthy features. Let’s go through several of them.

Web-based interface

Once Cockpit has been installed, it is accessible via a web browser, using either a server name or IP address. The web-based user interface provides a graphical, mouse-centric environment for managing servers and can be useful to users who prefer GUI interactions. Cockpit is cross-platform, allowing remote server management from any device with a web browser.

Real-time monitoring

Cockpit offers real-time monitoring of system resources, including CPU utilization, memory (RAM), disk space availability, and network activity. This feature can help administrations quickly identify performance issues and bottlenecks.

User management

Cockpit can simplify user accounts and permissions management, providing tools to delete, create, and modify user accounts.

Service management

Administrators can conveniently start, stop, enable, and disable system services and daemons in Cockpit.

Storage management

Cockpit includes tools for managing mass storage devices. Administrators can configure storage options and efficiently manage disk space.

Container management

Cockpit supports container use, which is good news for users who want to use technologies like Docker or Podman. Users can view container status, images, and logs within the Cockpit interface.

Security and authentication

Cockpit provides a secure access control and authentication mechanism that integrates with system security features. Administrators can configure access policies to protect the server.

Logs and journal

Administrators can access and analyze system logs and journal entries in the web UI. This can make it easier to diagnose and troubleshoot issues that come up.

Task automation

Cockpit simplifies common tasks for administrators through guided workflows and automation features, thus reducing the need for labor- and time-intensive manual operations.

Extensions

Various extensions and plugins make Cockpit highly customizable. Users can extend its functionality to cater to specific needs.

Compatibility

Cockpit is designed to work with a wide range of Linux distributions, including CentOS, Debian-based systems (such as Ubuntu and Kali-Linux), Red Hat Enterprise Linux (RHEL), and Fedora.

How To Install Cockpit

Before installing Cockpit, it is a good idea to update your Linux system and upgrade existing packages. Follow these steps.

1. Update your system

Run the following commands based on your Linux distribution.

For Debian-based systems (e.g., Ubuntu):

sudo apt update

For Red Hat-based systems:

sudo yum update

For Fedora systems:

sudo dnf update

2. Upgrade packages

After updating, proceed to upgrade the packages on your system.

For Debian-based systems:

sudo apt upgrade

For Red Hate-based systems:

sudo yum upgrade

For Fedora-based systems:

sudo dnf upgrade

Grant KnoetzeShowing the sudo apt update command being run to update the system before installation of Cockpit

Figure 1. Execute the sudo apt update command to update the system before installing Cockpit.

Grant KnoetzeShowing the sudo apt upgrade command being run to upgrade packages on the system

Figure 2. Run the sudo apt upgrade command to upgrade packages on the system.

3. Installation

Once the system is updated and upgraded, install Cockpit.

For Debian-based systems:

sudo apt install cockpit

For Red Hat-based systems:

sudo yum install cockpit

For Fedora-based systems:

sudo dnf install cockpit

Grant KnoetzeShowing the sudo apt install cockpit command being run to install Cockpit

Figure 3. Execute the sudo apt install cockpit command to install Cockpit.

During the installation process, you may be prompted to allocate disk space and confirm the installation. Type ‘Y’ for “yes” and hit the Enter key to continue.

Enable and Start the Cockpit Service

After successfully installing Cockpit, you must enable and start the Cockpit service. Depending on your system, you may have to do some troubleshooting here.

Use systemctl for interacting with the Cockpit service. Here are the commands to know.

To enable Cockpit service:

sudo systemctl enable cockpit

To initiate Cockpit service:

sudo systemctl start cockpit

You can also use the service command with options to start the Cockpit service – for example:

sudo service cockpit start 

You can use this command to confirm the running status of Cockpit:

sudo service cockpit status 

Grant KnoetzeShowing the use of the sudo service cockpit start command to start the Cockpit service, and the sudo service cockpit status command to confirm the running status of Cockpit

Figure 4. Use the sudo service cockpit start command to start the Cockpit service.  Use sudo service cockpit status to confirm the running status of Cockpit.

Open the Cockpit Web User Interface

To access the Cockpit web user interface, follow these steps:

1. Open Your Browser

Launch your preferred web browser.

2. Enter the URL

Type the URL into the address bar:

http://your_server_ip_or_hostname: 9090

Replace the “your_server_ip_or_hostnamewith the actual IP address or hostname of your server. If running locally, you can use 127.0.0.1.

Grant KnoetzeShowing the opening of the Cockpit web user interface on localhost and port 9090.

Figure 5. The Cockpit web user interface is opened on localhost and port 9090.

3. Acknowledge security warning

You might receive a security warning since Cockpit uses a self-signed SSL certificate. Proceed to the site, acknowledging the warning.

4. Log into Cockpit

Log in using your server or system credentials.

5. Explore the dashboard

Once logged in, you will be greeted with the Cockpit dashboard. The dashboard provides an overview of your server's status and performance. From here, you can explore Cockpit’s various features for system monitoring and administration.

Grant KnoetzeShowing the Cockpit dashboard in fine detail

Figure 6. Here’s an example of the Cockpit dashboard.

Grant KnoetzeShowing the Cockpit dashboard in a broader view

Figure 7. Here’s another view of the Cockpit dashboard.

Cockpit is now successfully installed and running on your system. Use its web interface for efficient server monitoring and management.

What Can You Do With Cockpit?

Within Cockpit’s intuitive user interface, you can monitor and manage a variety of tasks, including the following:

  • User management
  • Firewall management
  • Mass storage management, including RAID and LUKS partitions
  • Virtual machine management
  • Container management
  • Hardware management
  • Software updates and upgrades
  • CPU and system performance monitoring
  • Service control
  • System performance monitoring
  • Networking management
  • Logging
  • Systemd-based service management
  • Security Enhanced Linux (SELinux) on RHEL-based distributions

Additionally, there is a built-in terminal emulator you can access for command-line tasks.

Configuring Cockpit for Optimal Usage

How you configure Cockpit will depend on your organizational or personal requirements.

Consider the following configurations to enhance your experience:

Administrative access

If logging into Cockpit as a regular user with sudo privileges, enable administrator access by clicking “Turn on Administrative Access” when prompted. 

Modules

Cockpit supports various modules to extend functionality. Module examples include:

  • Composer: Generate custom images for Fedora, RHEL, and CentOS.
  • 389 Directory Server: Web-based interface for OpenLDAP.
  • Session Recording: Record user interactions with the server.
  • Subscription Manager: Manage all RHEL subscriptions.
  • oVirt Dashboard: Manage virtual machines.
  • ZFS Manager: Manage ZFS file systems.
  • File Sharing: Manage Samba and NFS shares.
  • Navigator: Full-featured file manager for Cockpit.
  • Benchmark: Storage benchmark tool.
  • Software Updates: Transactional updates from OpenSUSE.
  • Sensors: List all available sensors found in a machine.

Modules can be easily installed using the terminal or terminal emulator in Cockpit.

For example, below is how to install Cockpit Navigator.

For a Debian-based system:

sudo apt install cockpit-navigator

For a Red Hat-based distribution:

sudo yum install cockpit-navigator

For a Fedora distribution:

sudo dnf install cockpit-navigator

Takeaways

Cockpit stands out as a great tool for managing Linux server instances. Throughout this article, we’ve explored its main features, walked through the process of downloading and installing Cockpit, and examined its basic usage.

The extensive Cockpit documentation available is a valuable resource, and its widespread user community contributes a wealth of shared information through forums and various sites. The collaborative environment makes Cockpit not only one of the most rewarding but also one of the most efficient Linux GUI programs available.

Additional Resources and Links

Hide comments

Comments

  • Allowed HTML tags: <em> <strong> <blockquote> <br> <p>

Plain text

  • No HTML tags allowed.
  • Web page addresses and e-mail addresses turn into links automatically.
  • Lines and paragraphs break automatically.
Publish