Verified and Tested 09/03/2015
In this quick and simple article, we will install wget command on a CentOS 6.7 server and we have included a wget cheat sheet. Wget is a free software package for downloading files using HTTP, HTTPS and FTP.
A CentOS 6.7 server with Root privileges. If you do no have a server, you can spin up an efficient and reliable SSD Cloud server from Atlantic.Net.
Installing wget on a CentOS 6.7
Install wget using the following command:
yum install wget
You will be asked if it is okay to install the downloaded size, you would just type
yfor yes and press
Enter to continue. I have a screenshot of a successful install below:
Successful Installation of wget
Once installed, you can use it to download files or even entire web sites.
Quick wget Cheat Sheet
To download a single file from a website using the following command:
If your web page requires a username and password use the following command:
wget --user=youruser --password=yourpassword http://sitename.com/file.jpeg
Download a file from an ftp site using the following command:
If your ftp site requires a username and password use the following command:
wget ---ftp-user=youruser --ftp-password=yourpassword ftp://sitename.com/file.jpeg
Download and entire website using the following command:
wget -r http://sitename.com
Download and save it in a specific path using the following command:
wget --directory-prefix=folder/nextfolder sitename.com
Download a file and save it under a different name using the following command:
wget --output-document=filename.php sitename.com
Resume an interrupted file download using the following command:
wget --continue sitename.com/filename.mp4
Limit download speed of a file using the following command:
wget --limit-rate=1000k http://sitename.com/file.iso
Now you have successfully installed wget and have some examples to work with! You can see the wget manual by running “wget -h”. Please check back here for more updates or to find out how to limit Root user in Centos check out our how-to here, or see below for other interesting related how-to’s.
Cloud hosting is just one of the many hosting services offered by Atlantic.Net. Contact us today for more information!