Home Linux Commandline Tips How to Hide Wget Command Output in Linux Command Line

How to Hide Wget Command Output in Linux Command Line

Wget is a GNU-based free software that has made it possible for numerous Linux-based users to non-interactively download files over the internet or any network without relying on graphical tools like web browsers. Its file download prowess is associated with network/internet protocols like FTP, FTPS, HTTP, and HTTPS.

The primary objective of this article is directly associated with the last stated GNU Wget feature (handling unattended/background operations).

GNU Wget Installation in Linux

This non-interactive file download utility is not pre-installed on your Linux operating system distribution. To install it on various Linux OS distributions, reference the following Wget installation commands:

$ sudo apt install wget         [On Debian, Ubuntu and Mint]
$ sudo yum install wget         [On RHEL/CentOS/Fedora and Rocky Linux/AlmaLinux]
$ sudo emerge -a net-misc/wget  [On Gentoo Linux]
$ sudo pacman -S wget           [On Arch Linux]
$ sudo zypper install wget      [On OpenSUSE]    

GNU Wget Usage in Linux

The general syntax for the usage of the wget command-line-based file download tool is:

$ wget [option]… [URL]...

For instance, if we were to download a random file from let’s say Github and via Wget, we would execute the following command on our Linux terminal:

$ wget https://github.com/zethra/servy/blob/master/README.md 

As you might have noted, the above command does not include the [option] part as addressed in the Wget syntax.

Download File with Wget in Linux
Download File with Wget in Linux

The execution of the above command has yielded a Wget command output detailing things like the targeted filename, file type, file size, download speed, download duration, and time.

To download such a file without the need for is associated command output details, we will take the following approach:

$ wget -q https://github.com/zethra/servy/blob/master/README.md 

The Wget command option -q ensures that no Wget command output is visible on the terminal. We can also confirm the existence of the downloaded file with the command:

$ ls -l README.md
Hide Wget Output While Downloading File
Hide Wget Output While Downloading File

If you are worried about broken downloads, you could add the -c option to the above command to ensure the complete file download is a success.

$ wget -qc https://github.com/zethra/servy/blob/master/README.md 

You can now comfortably use the Wget command to download your files from a Linux environment without dealing with its command output.

Ravi Saive
I am an Experienced GNU/Linux expert and a full-stack software developer with over a decade in the field of Linux and Open Source technologies. Founder of TecMint.com, LinuxShellTips.com, and Fossmint.com. Over 150+ million people visited my websites.

Each tutorial at UbuntuMint is created by a team of experienced writers so that it meets our high-quality standards.

Was this article helpful? Please add a comment to show your appreciation and support.

Got something to say? Join the discussion.

Thanks for choosing to leave a comment. Please keep in mind that all comments are moderated according to our comment policy, and your email address will NOT be published or shared. Please Do NOT use keywords in the name field. Let's have a personal and meaningful conversation.