Insomnia is a versatile and powerful API client designed to simplify the process of testing, debugging, and managing RESTful APIs. With features like automated testing, advanced request chaining, environment variable management, and support for GraphQL, Insomnia stands out as a robust tool for developers working on API integrations. It also offers a user-friendly interface that allows for the seamless organization and execution of API requests, making it an essential tool in any developer’s toolkit. Insomnia’s lightweight nature, coupled with its ability to handle complex API workflows, ensures that developers can efficiently manage their API interactions without being bogged down by cumbersome processes.
In this guide, we will cover the step-by-step installation of Insomnia on Ubuntu versions 24.04, 22.04, and 20.04 using the recommended APT mirror. By following this method, you will not only install the latest version of Insomnia but also set up your system for automatic updates, ensuring that you always have access to the newest features and security enhancements. This approach is ideal for developers who prioritize stability and security in their development environment, as it minimizes the effort required to keep Insomnia up-to-date and fully functional.
Update Ubuntu Before Insomnia Installation
It is a good practice to ensure your system is up-to-date with all the existing packages before installing Insomnia to avoid potential conflicts.
sudo apt update && sudo apt upgrade
Install the Required Packages
You’ll need to install some dependencies to install Insomnia on your Ubuntu system.
sudo apt install apt-transport-https
Install Insomnia via APT Command
To start the installation process of Insomnia on your Ubuntu system, you’ll need to import the repository. You can do this by entering the following command in your terminal. This command will enable your system to access the necessary files and packages for installation:
echo "deb [trusted=yes arch=amd64] https://download.konghq.com/insomnia-ubuntu/ default all" | sudo tee /etc/apt/sources.list.d/insomnia.list
After importing the repository, you should run an APT update to ensure your system reflects the changes. This will allow your system to access the newly imported repository and retrieve the necessary files and packages for installation.
sudo apt update
At this point, you’re ready to install Insomnia on your Ubuntu system. To do this, enter the following command in your terminal to initiate installation and install the Insomnia software on your system.
sudo apt install insomnia
Launch Insomnia on Ubuntu via CLI or GUI
Now that you have successfully installed Insomnia, you can launch the tool using either of the two available methods.
CLI Command to Launch Insomnia
If you prefer the command line terminal, you can quickly launch Insomnia by entering the following command.
insomnia
GUI Method to Locate and Launch Insomnia
For desktop users who prefer not to use the command-line terminal, the best way to launch Insomnia is to open the application’s graphical user interface (GUI).
You can do this by following the path to the Insomnia application on your system.
Activities > Show Applications > Insomnia
Additional Insomnia Commands
Remove Insomnia
If you want to remove the video conference software from your system, you can use the following command in your terminal: This will initiate the removal process and delete the software from your system.
sudo apt remove insomnia
If you do not plan to reinstall the software, you can remove the repository using the following command. This will remove the repository and prevent your system from accessing it in the future.
sudo rm /etc/apt/sources.list.d/insomnia.list
Conclusion
By following the steps outlined in this guide, you successfully installed Insomnia on your Ubuntu system, ensuring it remains current with the latest updates through the recommended APT mirror. This setup not only provides you with the most recent features and security patches but also simplifies future upgrades, making your development workflow more efficient. As a final note, always ensure your APT sources are secure and that you regularly check for updates to keep your system and tools optimized. This proactive approach will help maintain a stable and secure development environment.