Ubuntu – How to download a file from a website via terminal

command lineurl

Suppose that we have a full URL of desired file e.g.


I would like to go without installing a new software. Is it possible?


 cp  'http://example.com/directory/4?action=AttachFile&do=get&target=file.tgz' hooray

doesn't work 😉

Best Answer

Open terminal and type

wget "http://domain.com/directory/4?action=AttachFile&do=view&target=file.tgz" 

to download the file to the current directory.

wget  -P /home/omio/Desktop/ "http://thecanadiantestbox.x10.mx/CC.zip"

will download the file to /home/omio/Desktop

wget  -O /home/omio/Desktop/NewFileName "http://thecanadiantestbox.x10.mx/CC.zip"

will download the file to /home/omio/Desktop and give it your NewFileName name.

Related Question