-1

I am aware that we can get .exe versions of many linux utilities. I happen to have wget.exe, curl.exe and busybox.exe. But how can I install them so that instead of typing

C:\Users\Rahul>cd downloads

C:\Users\Rahul\Downloads>wget

I can straight away type

C:\Users\Rahul>wget
3

You shouldn't copy them to C:\windows\system32.

Instead, place them in a sensible location and add that location to your %PATH% environment variable.

  • If you don't install the utilities in their default location (specified by the website or installer), you might place such utilities in a dedicated folder such as C:\bin\ or C:\programs\. I prefer this to a path in Program Files in case you install a program that doesn't handle spaces in path names very well.

  • You can (permanently) add a folder to your %PATH% in cmd.exe like this:

    setx PATH "%PATH%;C:\bin\"
    

    (Note that the set command will only change your path for the current session. setx changes it permanently.)

  • Note: the command above adds the folder to the end of your path, so a program anywhere else will take precedence if it has the same name as one in the folder you just added. If you want the folder you add to have precedence over everything else, instead use this command:

    setx PATH "C:\bin\;%PATH%"
    
0

Stupid of me. It was pretty simple, I just had to copy wget.exe to C:\windows\system32.

  • 2
    Or: put them in any other location and adjust the PATH that Windows uses for searching. – Arjan May 23 '15 at 10:16
  • 1
    @Arjan True... But my my method seems simpler. – rahuldottech May 23 '15 at 10:19
  • Better idea. Put such utilities in a separate directory and modify your %PATH% to include that directory. – fpmurphy May 23 '15 at 12:14

Not the answer you're looking for? Browse other questions tagged or ask your own question.