The regtest mode (regression testing mode) can be used to create a local blockchain for testing purposes.
The following commands can be used to start up a node in the regtest mode:
$ bitcoind -regtest -daemon Bitcoin server starting
Blocks can be generated using the following command:
$ bitcoin-cli -regtest generate 200
Relevant log messages can be viewed in the .bitcoin/regtest directory on a Linux system under debug.log:
After block generation, the balance can be viewed as follows:
$ bitcoin-cli -regtest getbalance 8750.00000000
The node can be stopped using this:
$ bitcoin-cli ...