Linux Wget command examples

kumkumsharma

Administrator
Staff member
In Linux command line you have to use wget command to download all your files from remote server. There are various basic ways to use wget command:

If you want to download the file in same directory:

You have to use below command to download the file in current directory

Code:
# wget https://hoststud.com/download.zip
If you want to download the file and want to save on desired location:

You can download the file on desired location with below command:

Code:
# wget https://hoststud.com/download.zip -O /opt/download.zip
If you want to download the file from FTP :

You can use below command to download the file from FTP account:

Code:
# wget ftp://ftp.hoststud.com/download.zip
If you are downloading file from password protected server:

You can use below command to download file from password protected FTP server:

Code:
# wget --ftp-user=username --ftp-password=password ftp://ftp.hoststud.com/download.zip
Similarly you can download the file from password protected http server:

Code:
# wget --http-user=username --http-password=password https://hoststud.com/download.zip
 
Top