Linux command
xmrig 命令
文本
复制后可按需替换文件名、目录或参数。
常用示例
Mine to a pool
xmrig -o [pool.example.com:3333] -u [wallet_address]
Mine using config file
xmrig --config [config.json]
Run benchmark
xmrig --bench [1M]
Mine with specific CPU threads
xmrig -o [pool:port] -u [wallet] -t [4]
Run in background
xmrig -o [pool:port] -u [wallet] -B
Enable CUDA
xmrig -o [pool:port] -u [wallet] --cuda
Enable OpenCL
xmrig -o [pool:port] -u [wallet] --opencl
Dry run
xmrig --config [config.json] --dry-run
说明
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.
参数
- -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
FAQ
What is the xmrig command used for?
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.
How do I run a basic xmrig example?
Run `xmrig -o [pool.example.com:3333] -u [wallet_address]` in a terminal, then adjust file names, paths, flags, or remote targets for your system.
What does -o _URL_, --url _URL_ do in xmrig?
Mining pool URL (host:port)