How to install wget package on Ubuntu/Debian server

How to install wget package on Ubuntu/Debian server

Error :

bash: /usr/bin/wget: No such file or directory
bash: wget: command not found

Fix :

1. Log into your Ubuntu/Debian server

2. Run ‘apt update’ command

3. Run the command ‘apt install wget’

4. Enter ‘y’ if apt ask for confirmation

 

You will see the above error if wget package is not installed on your server. Do the below steps to install wget package on your Ubuntu/Debian server.
 
First you must log into your Linux server via SSH as ‘root’ or sudo user.
 
Run ‘apt update’ command to update the package information on Ubuntu/Debian server.
 
Command :

apt update

OR

apt-get update

 

You can install wget package using ‘apt’ command.

 

Command :

apt install wget

OR

apt-get install wget

 

Enter ‘y’ and press enter, if apt ask for confirmation while installing wget package.

Type the command ‘wget –version’ to check the version of wget that is installed on your server.

 

Steps to install wget by downloading deb

1. Log into your Ubuntu/Debian server as sudo or root user.

2. Download wget package from archive.ubuntu.com

Link to download wget :

http://archive.ubuntu.com/ubuntu/pool/main/w/wget/

3. Install .deb package using dpkg

 

dpkg -i wgetpackage.deb

Example :

dpkg -i wget_1.20.3-1ubuntu1_amd64.deb