Linux wget Guide - ryzendew/Linux-Tips-and-Tricks GitHub Wiki
Linux wget Guide
Complete beginner-friendly guide to wget on Linux, covering Arch Linux, CachyOS, and other distributions including file downloads, recursive downloads, and web content retrieval.
Table of Contents
wget Installation
Install wget
Arch/CachyOS:
# Install wget
sudo pacman -S wget
Debian/Ubuntu:
sudo apt install wget
Fedora:
sudo dnf install wget
wget Basics
Download File
Basic usage:
# Download file
wget https://example.com/file.txt
# Downloads file to current directory
Save with Name
Custom filename:
# Save with custom name
wget -O output.txt https://example.com/file.txt
# -O = output (custom filename)
File Downloads
Resume Download
Continue download:
# Resume interrupted download
wget -c https://example.com/large-file.zip
# -c = continue (resumes from breakpoint)
Background Download
Download in background:
# Background download
wget -b https://example.com/file.txt
# -b = background (downloads in background)
Recursive Downloads
Download Website
Recursive download:
# Download website
wget -r https://example.com
# -r = recursive (downloads entire site)
Limit Depth
Limit recursion:
# Limit depth
wget -r -l 2 https://example.com
# -l = level (max depth: 2)
Troubleshooting
wget Not Found
Check installation:
# Check wget
which wget
# Install if missing
sudo pacman -S wget
Summary
This guide covered wget usage, file downloads, and recursive downloads for Arch Linux, CachyOS, and other distributions.
Next Steps
- curl Guide - HTTP requests
- wget and curl Guide - Combined guide
- Network Utilities - Network tools
- wget Documentation:
man wget
This guide covers Arch Linux, CachyOS, and other Linux distributions. For distribution-specific details, refer to your distribution's documentation.