Cockpit is graphical user interface hosted on Webs for administrative purpose Cockpit is easy to use, lightweight and powerful tool to manage Linux machines. You can easily add other machine with it, so it would be always easy to have common console to manage many machine. It is available on many distributions along Linux/Unix machines. So in this post we will how we can install and configure Cockpit to manage Linux machine through Web-console

Features of cockpit

Cockpit has many features which make it suitable for admins linux machine to work on linux machine for monitoring and can do administrative task through easy web console. Some of main features provided through this We console.
1. Cockpit is lightweight and powertool tool provide nice and easy web console
2. This has various interface for linux administrative task, like managing interfaces, Disks, user-management etc
3. Basic system settings and information.
4. We can add other machines as well on same console with just after installation of cockpit packages.
5. This also has basic monitoring interface for memory, Disk, CPU and I/O which make possible to have some basic
6. We can also work on virtual machine through it.
7. Also have interface to work on Docker on download, running, deleting etc docker through linux systems.
8. Packages installation and up-gradation.


I am going to use cockpit on My Ubuntu Machine and connect many other linux machine after installing cockpit on them as well.

# Ubuntu Release detail
ssirohi@jarvis ~ $lsb_release -a                                                   
No LSB modules are available.                                                          
Distributor ID: Ubuntu                                                                 
Description:    Ubuntu 20.04 LTS                                                       
Release:        20.04 
Codename:       focal                                                                  

# Cockpit Version
ssirohi@jarvis ~ cockpit-bridge –version
Version: 215
Protocol: 1
Payloads: dbus-json3 http-stream1 http-stream2 stream packet fsread1
fsreplace1 fswatch1 fslist1 null echo websocket-stream1
Authorization: crypt1

# Cocket port details
 ssirohi@jarvis  ~  sudo netstat -ntlp | grep 9090                                   
tcp6       0      0 :::9090                 :::*                    LISTEN      1/init 
# Cockpit Service details
 ssirohi@jarvis ~ systemctl status cockpit 
● cockpit.service - Cockpit Web Service                                                                                                                
     Loaded: loaded (/lib/systemd/system/cockpit.service; static; vendor preset: enabled)                                                              
     Active: inactive (dead) since Sat 2020-07-11 14:14:04 BST; 23min ago                                                                              
TriggeredBy: ● cockpit.socket                                                                                                                          
       Docs: man:cockpit-ws(8)                                                                                                                         
    Process: 6733 ExecStartPre=/usr/sbin/remotectl certificate --ensure --user=root --group=cockpit-ws --selinux-type= (code=exited, status=0/SUCCESS) 
    Process: 6734 ExecStart=/usr/lib/cockpit/cockpit-tls (code=exited, status=0/SUCCESS)                                                               
   Main PID: 6734 (code=exited, status=0/SUCCESS)                                                                                                      
Jul 11 13:28:05 jarvis systemd[1]: Starting Cockpit Web Service...                                                                                     
Jul 11 13:28:05 jarvis systemd[1]: Started Cockpit Web Service.                                                                                        
Jul 11 14:14:04 jarvis systemd[1]: cockpit.service: Succeeded.                                                                                         

How to install

We can install cockpit on Many distributions on Linux/Unix . Like Fedora,CentOS,RHEL, Ubuntu, Debian. Let’s see how we can install this on Ubuntu (Debian systems) or CentOS (RPM based machine) in this post.

Install on CentOS8.

Cockpit is default present in BaseOS repositories of CentOS, like for CentOS i can install cockpit without any extra repository and effort like below.

[root@srv19 ~]# yum install cockpit  
CentOS-8 - AppStream                             10 kB/s | 4.3 kB     00:00                    
CentOS-8 - AppStream                            4.4 MB/s | 5.8 MB     00:01                    
CentOS-8 - Base                                  33 kB/s | 3.9 kB     00:00                    
CentOS-8 - Base                                 958 kB/s | 2.2 MB     00:02                    
CentOS-8 - Extras                                16 kB/s | 1.5 kB     00:00                    
Dependencies resolved.                                                                         
 Package                        Arch    Version                         Repo        Size       
 cockpit                        x86_64  211.3-1.el8                     BaseOS      71 k       
Installing dependencies:                                                                       

... OutPut truncated ...
Transaction Summary                                                                      
Install  41 Packages                                                                     
Total download size: 16 M                                                                
Installed size: 43 M                                                                     
Is this ok [y/N]: y                                                                      

Start cockpit service

[root@srv19 ~]#  systemctl enable --now cockpit.socket   
Created symlink /etc/systemd/system/ → /usr/lib/systemd/system/cockpit.socket.       

In same way we can install it on Fedora and RHEL machine. We can also install it on Ubuntu machine, it also present by-default on their repositories.

Install on Ubuntu

We can install easily with Ubuntu 18.04 and Ubuntu 20.04 (i tried on both version). This package is present in default repositories on Ubuntu.

# apt-get install cockpit

Start of service on Ubuntu machine

#systemctl enable --now cockpit.socket

Installing cockpit is fair easy task task on any Debian/Ubuntu/RHEL/CentOS/Fedora based machine. Personally i tried on these machines.

Login in Cockpit

Cockpit is hosted on 9090 port by-default and on same web console we can connect other machines and monitor and work on them , we just need to install cockpit packages on those machine and need to connect cockpit through web console which would be easy as connecting any machine through ssh.

For login, we need to connect on 9090 port of installed machine like below.

Once we login on machine, we could see some basic information of login machine.

In above image we can we can on left side panel, we have many options to work on Linux administration. Below are various option of linux administration to in case we install various cockpit packages on Linux machines.
Below we can see we have various monitoring parameters which look like in below graph.

Like in case we need to work on virtual machine present on libvirt tools we can see all of them and can work on them directly from web console, like below.
We can also connect on virtual machine console as well, It’s really interesting that it has such granular features on web console like below.

We can also work on Docker image and docker instance through this web console, on left hand side there is container tab which has various details of docker image and containers.

So now we know a bit about cockpit tool in Linux machine which has wide variety of options to monitor and administrate through one console to many Linux Machines.