How to Use Wget in Ubuntu

The wget command allows you to download files from the Internet using a Linux operating system such as Ubuntu. Use this command to download either a single Web page or a complete copy of your company’s website. It also includes an option for downloading any external links included on the site. The command recreates the complete directory structure of the site downloaded on your computer’s hard drive, and you can store the local copy as a backup or use it for testing purposes.

1

Click on the “Search” button in the Ubuntu launcher bar, type “terminal,” then double-click “Terminal” to open the application.

2

Type the following command to install the package, if it is not currently installed:

sudo apt-get install wget

Type your password when prompted.

3

Type the following command to download a single page from the website:

wget http://www.example.com/filename

Replace “www.example.com” with the name of the site you want to download, and replace “filename” with the name of the file you want to download.

4

Type the following command to download an entire website:

wget -r http://www.example.com

5

Type the following command to download the entire website and any external links:

wget -r -H http://www.example.com



Leave a Reply