xmrig
TLDR
Mine to a pool with wallet address
SYNOPSIS
xmrig [options]
xmrig -o pool -u wallet [options]
DESCRIPTION
xmrig is a high-performance cryptocurrency miner supporting RandomX (Monero), KawPow (Ravencoin), CryptoNight, and GhostRider algorithms. It supports CPU and GPU mining on Windows, Linux, macOS, and FreeBSD.
Configuration is preferably done via JSON config file, which supports features not available via command line like multiple pools and mining profiles. The miner automatically selects optimal settings based on hardware detection.
For RandomX mining on Linux, enabling hugepages significantly improves performance. The miner includes a 1% default donation to developers, which can be adjusted via configuration.
PARAMETERS
-o URL, --url URL
Mining pool URL (host:port)-u WALLET, --user WALLET
Wallet address or username-p PASS, --pass PASS
Password for pool-t NUM, --threads NUM
Number of CPU threads-c FILE, --config FILE
JSON configuration file-B, --background
Run in background (daemon mode)--cuda
Enable CUDA backend (NVIDIA)--opencl
Enable OpenCL backend (AMD)--no-cpu
Disable CPU mining--cuda-devices LIST
Comma-separated CUDA device indices--opencl-devices LIST
Comma-separated OpenCL device indices--donate-level N
Donation percentage (default: 1%)--randomx-1gb-pages
Use 1GB hugepages (Linux, requires setup)--bench N
Run benchmark (1M to 10M hashes)--stress
Continuous stress test mode--dry-run
Test configuration without mining-V, --version
Show version-h, --help
Show help
CAVEATS
Cryptocurrency mining consumes significant electricity and generates heat. Profitability depends on hardware, electricity costs, and cryptocurrency prices. Some cloud providers and ISPs prohibit mining. Running at full capacity may reduce hardware lifespan. Ensure adequate cooling for sustained operation.
HISTORY
XMRig was created as an open-source Monero miner, originally focusing on CPU mining with the CryptoNight algorithm. When Monero switched to the RandomX algorithm in 2019, XMRig was updated to support it. The project expanded to include GPU support via CUDA and OpenCL backends. XMRig became one of the most widely used miners due to its performance, cross-platform support, and active development.


