How to Install Cockpit Web Console on Ubuntu 20.04 Server
Cockpit is a free and open source web console tool for Linux administrators and used for day to day administrative and operations tasks. Initially Cockpit was only available for RHEL based distributions but now a days it is available for almost for all Linux distributions. In this article we will demonstrate how to install Cockpit on Ubuntu 20.04 LTS Server (focal fossa) and what administrative tasks can be performed with Cockpit Web Console.
Installation of Cockpit on Ubuntu 20.04 LTS Server
Since Ubuntu 17.04, cockpit package is available in the default package repositories. So the installation has become straight forward using apt command,
$ sudo apt update $ sudo apt install cockpit -y
Once cockpit package is installed successfully then start its service using the following systemctl command,
$ sudo systemctl start cockpit
Run the following to verify the status of cockpit service,
$ sudo systemctl status cockpit
Above output confirms that cockpit has been started successfully.
Access Cockpit Web Console
Cockpit listen its service on 9090 tcp port, in case firewall is configured on your Ubuntu server 20.04 then you have to allow 9090 port in firewall.
[email protected]:~$ ss -tunlp | grep 9090 tcp LISTEN 0 4096 *:9090 *:* [email protected]ver:~$
Run following ‘ufw’ command to allow cockpit port in OS firewall,
[email protected]:~$ sudo ufw allow 9090/tcp Rule added Rule added (v6) [email protected]:~$
Now access Cockpit web console using following url:
Use the root credentials or sudo user credentials to login, in my case ‘pkumar’ is the sudo user for my setup.
Perfect above screen confirms that we have successfully able to access and login cockpit dashboard. Let’s see what are the different administrative task that can be performed from this dashboard.
Administrative Task from Cockpit Web Console on Ubuntu 20.04 LTS Server
When we first time login to dashboard, it shows basic information about our system like package updates, RAM & CPU utilization and Hardware and system configuration etc.
1) Apply System Updates
One of important administrative task is to apply system updates, from cockpit web console we can easily do this, go to the ‘System Updates’ option where we you will get the available updates for your system, example is shown below,
If you wish to install all available updates, then click on “Install All Updates” option
We will get the message on the screen to reboot the system after applying the updates. So, go ahead and click on “Restart System”
2) Managing KVM Virtual Machine with cockpit
It is also possible that we can manage KVM VMs using cockpit web console but by default ‘Virtual Machine’ option is not enabled. To enable this option install ‘cockpit-machines’ using apt command,
$ sudo apt install cockpit-machines -y
Once the package is installed then logout and login to Cockpit console.
3) View System Logs
From the ‘Logs’ tab we can view our system logs. System logs can also be viewed based on its severity.
4) Manage Networking with Cockpit
System networking can easily be managed via networking tab from cockpit web console. Here we can view our system Ethernet cards speed. We have the features like creating bonding and bridge interface. Apart from this we can also add VLAN tagged interfaces on our system.
5) Manage System and Application services
From the ‘services’ tab we can restart, stop and enable system and application services. If you wish to manage any service, just click on that service
6) Manage Local Accounts
If you want to manage local account then choose ‘Accounts’ tab from web console, here you can create new local accounts and change the parameters of existing users like password reset, roles and lock account.
7) Terminal Access
If you wish to access terminal of your system from cockpit dashboard then choose “Terminal” tab.
That’s all from this tutorial, I hope you got an idea on how to install and use Cockpit Web console effectively on Ubuntu 20.04 LTS Server. Please don’t hesitate to share your valuable feedback and comments.
Also Read : How to Install Cockpit Web Console on Debian 10