How to Install Postman REST Client in Debian 11

In this guide, we are going to explore how to install Postman Client on Debian 11.

Postman is an application used for API testing. Postman is the Complete API Development Environment with Integrated Tools for Every Stage of the API Lifecycle. It is an HTTP client that provides a graphical user interface through which you can tests HTTP requests while obtain different types of responses. Postman allows us to build, test and modify the API.

Postman can run PUT, PATCH, DELETE, and various other request methods as well, and also has utilities to help with developing APIs. Free and paid versions are available for Mac, Windows, Linux, and also as a Chrome app.

Postman is the most popular API testing platform, it is being used bu Over 15 million developers.

Postman has rich documentation that can be found here.

Related content:

Prerequisites

To follow along, ensure you have the following:

  • An updated Debian 11 server
  • Conenction to the internet
  • Root access to the server or user with sudo access

Ensure that the server is updated

Before proceeding, let us make sure that our server packages are updated. Use this command to update the repos then upgrade server packages:

1
2
sudo apt update
sudo apt -y upgrade

Let us also install common packages:

1
sudo apt install -y vim

Using Snap

Snap is a software packaging and deployment system developed by Canonical for operating systems that use the Linux kernel.

Snaps are cross-distribution, dependency-free, and easy to install applications packaged with all their dependencies to run on all major Linux distributions. From a single build, a snap (application) will run on all supported Linux distributions on desktop, in the cloud, and IoT. Supported distributions include Ubuntu, Debian, Fedora, Arch Linux, Manjaro, and CentOS/RHEL.

Check mode about the snaps in their site here.

First ensure snapd (package providing support for snap) is installed:

1
sudo dnf install snapd

Either log out and back in again, or restart your system, to ensure snap’s paths are updated correctly.

After this, install the core snap in order to get the latest snapd.

1
2
3
$ sudo snap install core
2021-10-25T09:30:45+03:00 INFO Waiting for automatic snapd restart...
core 16-2.52.1 from Canonical installed

Then create a symbolic link to /var/lib/snapd/snap for /snap:

1
sudo ln -s /var/lib/snapd/snap /snap

Then install Postman:

1
2
$ sudo snap install postman
postman (v8/stable) 8.12.4 from Postman, Inc. (postman-inc) installed

Downloading the Postman Desktop app

Head over to the Downloads page here and click on the Download the App button.

Once downloaded, open your terminal and move to the downloads directory.

1
$ cd ~/Downloads/

Check that the Postman file is downloaded:

1
2
$ ls
Postman-linux-x86_64-8.12.4.tar.gz

Now extract the file:

1
tar -xzf Postman-linux-x86_64-8.12.4.tar.gz

Now move the extracted directory to the /opt directory:

1
$ sudo mv Postman /opt

Create a symlink for the executable /opt/Postman/Postman called /usr/local/bin/postman to access the Postman command:

1
$ sudo ln -s /opt/Postman/Postman /usr/local/bin/postman

To test that its working as expected, type postman in terminal:

1
postman

If all goes well, you should see Postman launch, the first page is the login page, skip that and you will see the postman launch page.

Adding a Postman Launcher

A more convenient way to launch Postman is to use the launcher.

To start the app from a launcher icon, you need to create a .desktop file in the system launcher location in this path /usr/share/applications/. The .desktop is a shortcut that is used to launch an application in Linux.

For Postman desktop app lets create the file with this command:

1
sudo vim /usr/share/applications/postman.desktop

Then let’s add the following content pointing to our Postman binary:

1
2
3
4
5
6
7
[Desktop Entry]
Type=Application
Name=Postman REST Client
Icon=/opt/Postman/app/resources/app/assets/icon.png
Exec="/opt/Postman/Postman"
Comment=Postman REST Client Desktop App
Categories=Development;Code;Testing;

Save the file and close it.

You should now be able to access Postman by searching in the application launcher.

Removing/Uninstalling Postman Rest Client

If for some reason you no longer want Postman in your machine, you can remove it.

If it was installed using snap, use this command to. uninstall:

1
sudo snap remove postman

If you installed it using the manual method, you can remove it by running the following commands:

Remove the Postman Installation in /opt/Postman and the symbolic link:

1
sudo rm -rf /opt/Postman && rm /usr/local/bin/postman

Remove the Launcher:

1
sudo rm /usr/share/applications/postman.desktop

That is all. You are now able to install Postman in your system and uninstall it if need be.

Checkout more info about Postman on their site https://www.postman.com/.

Last updated on Oct 14, 2024 11:46 +0300
comments powered by Disqus
Citizix Ltd
Built with Hugo
Theme Stack designed by Jimmy