<p>It's possible to mine Testnet BTC with CPU (even with the basic generatetoaddress command), because testnet difficulty drops significantly when there are no blocks on the network for 20 minutes:</p>
<pre><code>bitcoin-cli generatetoaddress nblocks &quot;address&quot; ( maxtries )
</code></pre>
<p>If you want to continuously mine on Linux, create a bash loop:</p>
<pre><code>while [ 1 ]
do
    bitcoin-cli generatetoaddress 1 &quot;2N5fJkfCv4cF6vsa5QQJnsazBKWNXynn9zp&quot; 10000000
done
</code></pre>
<p>Your luck will depend on other miners activity, for example I was able to mine <a href="https://mempool.space/testnet/address/2N5fJkfCv4cF6vsa5QQJnsazBKWNXynn9zp" rel="nofollow noreferrer">6 blocks</a> in 2.5 months.</p>

CC BY-SA 4.0
2021-10-28T11:00:54.987Z
'generate' methods are only effective on Regtest, where you can create blocks at will.
Testnet works like Mainnet (although with lower difficulty), so you need proper mining equipment to generate a block.
FedFranz
CC BY-SA 4.0
2021-10-29T17:25:43.907Z
You can mine with this command, like I did, check my testnet BTC address: https://blockstream.info/testnet/address/2N5fJkfCv4cF6vsa5QQJnsazBKWNXynn9zp
This is possible because the difficulty drops to 1 on testnet if there is no new block after 20 minutes.
DaWe
CC BY-SA 4.0
2020-02-25T11:01:23.510Z
2024-03-01T04:47:57.607Z
2024-03-01T04:47:57.607Z
DaWe
<p>I need approximately 100 Bitcoin Testnet to run an experiment on the lightning network. </p>

<p>Any suggestion on how to run CPU mining? Should I use cgminer?
Make any sense to perform solo mining on testnet?</p>

<p>Currently I am running a full testnet node with bitcoind on a linux environment. </p>

CC BY-SA 4.0
2019-03-13T16:35:25.427Z
Maybe you can find a faucet? Here is an older but probably still appropriate answer: https://bitcoin.stackexchange.com/questions/29791/how-can-i-do-cpu-mining-on-testnet
Eddie Dunn
CC BY-SA 4.0
2019-03-14T15:50:26.917Z
You will have to wait until the difficulty is reset to 1, and even then, you might not be able to win a block with the flood of other blocks coming in.
JBaczuk
<bitcoind><mining-profitability><lightning-network><miner-configuration><testnet>
How to perform CPU mining on bitcoin TESTNET on Linux?
Stefano Angieri
# How to perform CPU mining on bitcoin TESTNET on Linux?

(Asked by: username_0 on 2019-03-13)

I need approximately 100 Bitcoin Testnet to run an experiment on the lightning network.

Any suggestion on how to run CPU mining? Should I use cgminer?
Make any sense to perform solo mining on testnet?

Currently I am running a full testnet node with bitcoind on a linux environment.

**Tags:** bitcoind, mining-profitability, lightning-network, miner-configuration, testnet

> **Comments:**
> **username_1**: Maybe you can find a faucet? Here is an older but probably still appropriate answer: https://bitcoin.stackexchange.com/questions/29791/how-can-i-do-cpu-mining-on-testnet  
> **username_2**: You will have to wait until the difficulty is reset to 1, and even then, you might not be able to win a block with the flood of other blocks coming in.  

---

## 1 answers

### Answer by username_3 on 2020-02-25. Score: 0 | Accepted answer

It's possible to mine Testnet BTC with CPU (even with the basic generatetoaddress command), because testnet difficulty drops significantly when there are no blocks on the network for 20 minutes:

```
bitcoin-cli generatetoaddress nblocks "address" ( maxtries )

```

If you want to continuously mine on Linux, create a bash loop:

```
while [ 1 ]
do
    bitcoin-cli generatetoaddress 1 "2N5fJkfCv4cF6vsa5QQJnsazBKWNXynn9zp" 10000000
done

```

Your luck will depend on other miners activity, for example I was able to mine [6 blocks](https://mempool.space/testnet/address/2N5fJkfCv4cF6vsa5QQJnsazBKWNXynn9zp) in 2.5 months.

> **Comments:**
> **username_4**: 'generate' methods are only effective on Regtest, where you can create blocks at will. Testnet works like Mainnet (although with lower difficulty), so you need proper mining equipment to generate a block.  
> **username_3**: You can mine with this command, like I did, check my testnet BTC address: https://blockstream.info/testnet/address/2N5fJkfCv4cF6vsa5QQJnsazBKWNXynn9zp This is possible because the difficulty drops to 1 on testnet if there is no new block after 20 minutes.  

---

