How to Mine Monero/BTC?

Is there any documentation on how to link the existing wallets in Whonix to enable mining for Monero/BTC? If it works, would increasing the number of CPU’s in the VM running the mining software help?

I found this guide, but it fails on the first step when I try entering the comand in the Fedora-32 template I am using.

Mining Monero on Fedora 24 and above
Remember to replace WALLET_ADDRESS_HERE with your own Monero wallet's public address. The "-t 3" option determines how many of your CPU threads will be used for mining.

yum -y install git curl-devel libcurl glib-devel libtool
git clone
cd cpuminer-multi
CFLAGS="-march=native" ./configure
sudo ./minerd -a cryptonight -o stratum+tcp:// -u WALLET_ADDRESS_HERE -p x -t 3

Adding virtual cpus is unlikely to help much as you just get more context switching between vcpus. What matters is how many physical cores are dedicated to the miner application. In fact you are likely going to burn more electricity by mining with a generic cpu than you will ever gain in currency.

The best way to mine btc would be to use a GPU pass through thus dedicating that gpu hardware to the miner app. At that point you may or may not even break even. Most modern miners use very specialized hardware because the process has become much more inefficient. That inefficiency is by design. There is only a fixed number coins to mine, and the more that have already been mined the harder it becomes to generate even more.

If you just want to see how it all works then using a VPU is fine, but don’t expect to get rich doing it. Best of luck!

Fair enough, I will leave mining to the pros. I just thought it would be nice to have a VM mining on the side because my computer is always running.


Actually, Monero implemented RandomX specifically to avoid specialized hardware (ASICs). The best mining hardware available for it is current gen AMD CPUs. GPUs do not mine Monero.

If you want to solo mine (without a pool) you can definitely play around with it within the basic wallet software. The likelihood of mining a block solo will be low, but you might get lucky, and it’s fun to support the network anyway