Ubuntu

How to Install Postman on Ubuntu 24.04

install postman in ubuntu 24.04

Application programming interface or API serves the purpose of communication or exchanging data between applications. In other words, it is a set of rules by which different software or applications communicate. Postman is an API development tool that includes its design, testing, documentation, and monitoring.

Postman offers an interactive interface to make requests, view responses, and debug, i.e., the process of API testing.

Today, we will guide you to install it on your Ubuntu 24.04:

Outline:

How to Install Postman on Ubuntu 24.04

Postman comes with several features, some of the most popular include the Postman visualizer, Postman echo service, and built-in libraries. Further, it allows teams to collaborate on API development and testing which helps in large-scale projects. You can also create mock servers to check the API responses without the need for an actual backend. To install Postman on Ubuntu 24.04 there are five ways:

1: Through the Snap Package Manager

One way to install Postman on Ubuntu 24 is by using the Snap package installer. The official help of Postman also recommends this method, as this package includes all the libraries and dependencies required by Postman to function properly. To install Postman on Ubuntu execute:

sudo snap install postman

After the completion of installation, launch it through the terminal by executing:

postman

2: Through Flatpak

Another method for Postman installation on Ubuntu is using the flathub repository and for that execute:

flatpak install flathub com.getpostman.Postman

Once the installation is complete, launch it via the terminal command given below:

flatpak run com.getpostman.Postman

3: Through Tar File

If you are looking for the latest version of Postman then you must try this method, the tar file for the latest version is available on Postman’s official website. First download the compressed file either by visiting the office website:

Or download it via the terminal command using the wget utility:

wget https://dl.pstmn.io/download/latest/linux_64

Now extract the file to bin directory:

sudo tar -xvf linux64 -C /usr/bin

The command in case you have downloaded the Postman tar file using the browser:

sudo tar -xvf postman-linux-x64.tar.gz -C /usr/bin

Now to run Postman from any directory you have to create its environment variable path and add it to the existing PATH variable in the bash shell file:

echo 'export PATH="$PATH:/usr/bin/Postman"' >> ~/.bashrc

Now after adding the path either restart the shell session or reboot the system and then launch Postman via the following terminal command:

Postman

While installing Postman through its tar file, you need to manually create its desktop application and for that create a file named Postman.desktop in the applications folder under the share directory. Next past the following code lines:

[Desktop Entry]

Name=Postman API Tool

GenericName=Postman

Comment=Testing API

Exec=/usr/bin/Postman/Postman

Terminal=false

X-MultipleArgs=false

Type=Application

Icon=/usr/bin/Postman/app/resources/app/assets/icon.png

StartupWMClass=Postman

StartupNotify=true

These code lines include the name of the desktop icon, the path for the installed directory, and the icon path:

Now you can launch Postman from the application menu as well:

Further, if you want to install the pre-release version with new features of Postman, then install its canary version. For that, you have to repeat the same process discussed above instead, you need to search for the canary version file on the official website:

4: Through Installation Script

If you are looking for a command-line version of Postman, then you can install it by downloading its installation script and executing it in a bash shell:

curl -o- "https://dl-cli.pstmn.io/install/linux64.sh" | sh

To confirm the installation check its version via following terminal command:

postman -v

Further to use Postman through its command line interface below is the syntax for executing commands:

postman [options] [command]

5: Through the Ubuntu App Center

Installing Postman using Ubuntu’s App Center is one of the easiest and most useful ways, as it gives the choice to install different versions. Simply launch the App Center search for Postman, and afterward click on install:

Once the application is installed, you can either launch it by clicking on the open option or use the Ubuntu application menu:

Note: Previously there was a repository for Postman so that it could be installed via the default package manager:

sudo add-apt-repository 'deb https://dl.bintray.com/getpostman/deb stable main'

However, currently, this method is not valid as when I tried to add the repository it gave an error of no release file which means that the repository is dead or no longer active:

How to Remove Postman From Ubuntu 24.04

Five ways are explained for installing Postman on Ubuntu 24.04 and each method has a different uninstallation method. So to remove via snap app installer, execute:

sudo snap remove postman

In the case of Flathub repository, remove Postman from Ubuntu by executing:

flatpak remove com.getpostman.Postman

If you have used the tar file for installing Postman then first remove the extracted directory and then remove the file created for its desktop application:

sudo rm -r /usr/bin/Postman

sudo rm /usr/share/applications/Postman.desktop

Afterward, edit the bash execution file and remove the environment variable path:

sudo nano .bashrc

To remove the command line version of Postman first remove the bash file saved in the bin directory:

sudo rm -r linux64

Next, remove its configuration file

sudo rm -rf ~/.config/Postman

After that, remove the files created as a result of bash file execution, they will in the same directory in which the command for bash install file was executed:

sudo rm -r .postman

sudo rm -r Postman

Lastly, to remove Postman via Ubuntu’s App Center search for it and select uninstall from the meatball menu:

Conclusion

Postman is an API development tool that helps to build, test, and modify application programming interfaces. To install Postman on Ubuntu 24.04 five ways are using snap package manager, flatpak app installer, tar file, installation script, and Ubuntu App center. The recommended method to install it is by using the Snap package, as it includes all the libraries that are required to function properly.

Similar Posts