Download a package manually using wget (e.g., a sample .rpm or .deb file). (Verify its existence using ls)

1 min read
Here's how you can manually download a package using wget
and verify its existence with ls
:
For a .deb package (Debian/Ubuntu):
bash
Copy
wget http://archive.ubuntu.com/ubuntu/pool/main/z/zlib/zlib1g_1.2.11.dfsg-2ubuntu1_amd64.deb
ls -l zlib1g_1.2.11.dfsg-2ubuntu1_amd64.deb
For a .rpm package (CentOS/RHEL):
bash
Copy
wget http://mirror.centos.org/centos/7/os/x86_64/Packages/zlib-1.2.7-18.el7.x86_64.rpm
ls -l zlib-1.2.7-18.el7.x86_64.rpm
What's happening:
wget
downloads the package file from the URLls -l
shows the downloaded file with details (size, permissions, timestamp)
If the download was successful, you'll see the file listed with its details. If not, you'll get a "No such file or directory" message.
Note: These are example URLs for common packages - you can replace them with any valid .deb or .rpm file URL you need to download.
0
Subscribe to my newsletter
Read articles from Ravi Vishwakarma directly inside your inbox. Subscribe to the newsletter, and don't miss out.
Written by
