Facebook Twitter Instagram
    TecAdmin
    • Home
    • Ubuntu 20.04
      • Upgrade Ubuntu
      • Install Java
      • Install Node.js
      • Install Docker
      • Install LAMP Stack
    • Tutorials
      • AWS
      • Shell Scripting
      • Docker
      • Git
      • MongoDB
    • FeedBack
    • Submit Article
    • About Us
    Facebook Twitter Instagram
    TecAdmin
    Home»Linux Commands»5 Wget Examples to Download Files on Linux Command Line

    5 Wget Examples to Download Files on Linux Command Line

    RahulBy RahulMarch 30, 20132 Mins Read

    wget is Linux command line utility. wget is widely used for downloading files from Linux command line. There are many options available to download a file from remote server. wget works same as open url in browser window.

    Tip 1: Download File using Wget

    Below example will download file from server to current local directory.

    $ wget https://tecadmin.net/file.zip
    

    Tip 2: Download File & Save to Specific Location

    Below command will download zip file in /opt folder with name file.zip. -O is used for specify destination folder

    # wget https://tecadmin.net/file.zip -O /opt/file.zip
    

    Tip 3: Download File from FTP

    Some time you required to download file from ftp server, so wget can easily download file from ftp url like below.

    # wget ftp://ftp.tecadmin.net/file.zip
    

    Tip 4: Download File from Password Protected URLs

    Sometimes we required to specify username and password to download a file. While using browser its easy but using command line it doesn’t prompt for login credentials. Below examples will show to how to use username,password while downloading files from password protected sources.

    Tip 4.1: Download file from Password protected ftp server.

    $ wget --ftp-user=username --ftp-password=secretpassword ftp://ftp.tecadmin.net/file.zip
    
    or
    
    $ wget ftp://username:[email protected]/file.zip
    

    Tip 4.2: Download file from password protected http server.

    # wget --http-user=username --http-password=secretpassword https://tecadmin.net/file.zip
    or
    # wget --user=username --password=secretpassword https://tecadmin.net/file.zip
    

    Tip 4.3: Download file behind password protected proxy server.

    $ wget --proxy-user=username --proxy-password=secretpassword https://tecadmin.net/file.zip
    

    Tip 5: Download File from Untrusted Secure URL.

    If any download url is using untrusted ssl certificate, wget will not download that file. But we can download it by using –no-check-certificate parameter in url.

    $ wget  https://tecadmin.net/file.zip  --no-check-certificate
    
    download files wget
    Share. Facebook Twitter Pinterest LinkedIn Tumblr Email WhatsApp
    Previous ArticleChicken Egg Problem in Linux and Initrd
    Next Article Install Fsniper ( Directory Monitoring ) Tool in CentOS, RHEL and Fedora

    Related Posts

    How to Search Recently Modified Files in Linux

    2 Mins Read

    Bash Printf Command

    Updated:December 23, 20212 Mins Read

    Tee Command in Linux with Examples

    4 Mins Read

    How to Scan Open Ports with Nmap

    5 Mins Read

    Handling filenames with spaces in Linux

    3 Mins Read

    How To Compare Two Files in Linux

    Updated:August 23, 20215 Mins Read

    2 Comments

    1. web technology on April 26, 2013 8:15 am

      I am intrigued and enthusiastic about what you are writing about the following.

      Reply
    2. bottom line on April 18, 2013 1:45 am

      I will be interested along with thinking about what you’re writing about here.

      Reply

    Leave A Reply Cancel Reply

    Recent Posts
    • Filesystem Hierarchy Structure (FHS) in Linux
    • How to accept user input in Python
    • What is difference between var, let and const in JavaScript?
    • What is CPU? – Definition, Types and Parts
    • What is the /etc/aliases file
    Facebook Twitter Instagram Pinterest
    © 2022 Tecadmin.net. All Rights Reserved | Terms  | Privacy Policy

    Type above and press Enter to search. Press Esc to cancel.