How to Use Wget to Download Files at Windows' Command Line

Download Files from the Windows Command Line with Wget
(Image credit: Tom's Hardware)

 

Most users will download files onto their PC using their web browser. There’s a problem with this method, however—it’s not particularly efficient. If you need to pause your download, or if you’ve lost your connection, you’ll probably need to start your download again from scratch. You may also be working with Python or other code at the command line and want to download directly from the command prompt. 

Latest Videos FromTom's Hardware
TOPICS
Ben Stockton
Deals Writer

Ben Stockton is a deals writer at Tom’s Hardware. He's been writing about technology since 2018, with bylines at PCGamesN, How-To Geek, and Tom’s Guide, among others. When he’s not hunting down the best bargains, he’s busy tinkering with his homelab or watching old Star Trek episodes.

  • bit_user
    I always install Cygwin/X on any Windows PC I need to use. Then, just install wget through that way.
    https://x.cygwin.com/docs/ug/setup.html
    I find the default terminal very ugly and not UNIX-like in how it does copy/paste, so I use XLaunch to start the X11 server and then run everything from xterm. Just select to "copy" and middle-button pastes.
    Reply
  • brandonjclark
    bit_user said:
    I always install Cygwin/X on any Windows PC I need to use. Then, just install wget through that way.
    https://x.cygwin.com/docs/ug/setup.html
    I find the default terminal very ugly and not UNIX-like in how it does copy/paste, so I use XLaunch to start the X11 server and then run everything from xterm. Just select to "copy" and middle-button pastes.
    That all sounds REALLY complicated when WSL2 does a pretty great job.

    You can even integrate it with VSCode so you can code directly into the WSL2 instance! Try it out!

    a/kWh3jak
    Reply
  • bit_user
    brandonjclark said:
    That all sounds REALLY complicated when WSL2 does a pretty great job.
    Cygwin? Given that it's most of the userspace environment + components as you get on a typical Linux distro, it's really quite an easy and painless experience. I probably wouldn't install it just for wget, but that wasn't the point. The point is that I install it and get wget for "free".

    Probably the biggest benefit is that I can ssh w/ X tunneling and remotely run GUI programs on my Linux boxes.

    I have yet to try WSL2. There's no need, really. Unless I need to do something serious, it's hard for me to see how it would suit my needs any better than Cygwin/X.

    brandonjclark said:
    You can even integrate it with VSCode so you can code directly into the WSL2 instance! Try it out!
    But, I don't use VSCode. I already developed just fine, on Linux, without it. And I really don't like screen-filling IDEs. I open each file it its own editor window and run commands or the debugger from a separate xterm.
    Reply
  • brandonjclark
    bit_user said:
    Cygwin? Given that it's most of the userspace environment + components as you get on a typical Linux distro, it's really quite an easy and painless experience. I probably wouldn't install it just for wget, but that wasn't the point. The point is that I install it and get wget for "free".

    Probably the biggest benefit is that I can ssh w/ X tunneling and remotely run GUI programs on my Linux boxes.

    I have yet to try WSL2. There's no need, really. Unless I need to do something serious, it's hard for me to see how it would suit my needs any better than Cygwin/X.


    But, I don't use VSCode. I already developed just fine, on Linux, without it. And I really don't like screen-filling IDEs. I open each file it its own editor window and run commands or the debugger from a separate xterm.
    That's fair. Modern source control requirements aside (git integration), vscode really has a ton of creature comforts like a built-in terminal, plugins up the wazoo with support for just about anything, and is EXTREMELY customizable.
    Reply
  • paradyne
    On Windows 11 at least, maybe 10? Open command line / powershell.

    winget install wget
    Restart shell. Job done.
    Reply
  • bit_user
    brandonjclark said:
    Modern source control requirements aside (git integration), vscode really has a ton of creature comforts like a built-in terminal, plugins up the wazoo with support for just about anything, and is EXTREMELY customizable.
    I know people who use it and like it. No shade intended, but it doesn't suit my workstyle very well.

    As for git, I'm not the world's most sophisticated user, but I do alright with the commandline tool + the github web interface.
    Reply