How to Mine Bitcoin with CPU on Windows and Linux(Debian/Ubuntu)

Shubham Tatvamasi
Dec 10, 2017 · 2 min read

Bitcoin is a digital currency based on Blockchain technology with sha256 Algorithm and works on Proof of Work. The blocks are generated by POW technology.

Create your wallet for Bitcoin

1. Go to https://blockchain.info/wallet/
2. Click on sign up and fill your details, then sign in.
3. Click on request button.
4. Now you will be able to see your wallet address.

Windows CPU Mining Steps

We will be using CPU Miner Software for Bitcoin Mining
Download the latest CPU Miner software for Windows
https://github.com/tpruvot/cpuminer-multi/releases
e.g. cpuminer-multi-rel1.3.1-x64.zip
extract the zip file and edit the “RUN-TimeTravel.bat” file

cpuminer-gw64-corei7 -a sha256d -o stratum+tcp://connect.pool.bitcoin.com:3333 -u 1HmfbfGHey2oTExiQwHag16N1tb8ATSeYv -p c=BTC

Just copy and replace the above line in your .bat file, only change your wallet address
-a = Algorithm of coin which you are mining
-o = Your pool address and port number
-u = Your wallet address

Now double click on .bat file and your CPU mining will get stated.

Linux(Debian/Ubuntu) CPU Mining Steps

For Linux users will have to compile the cpuminer software

  1. You have to clone the repository.

git clone https://github.com/tpruvot/cpuminer-multi

2. You have to install the dependencies for compiling

sudo apt-get install automake autoconf pkg-config libcurl4-openssl-dev libjansson-dev libssl-dev libgmp-dev make g++

3. Go inside the cpuminer-multi folder and run the build command

./build.sh

4. Create a new file called run.sh and paste the code

#!/bin/bash
./cpuminer -a sha256d -o stratum+tcp://connect.pool.bitcoin.com:3333 -u 1HmfbfGHey2oTExiQwHag16N1tb8ATSeYv -p c=BTC

5. Now you have to change your wallet address in the file and save it

6. now you have to run the following command to make it executable

chmod +x run.sh

7. Now just run the run.sh and your CPU mining will get stated.

Congratulations on completing all the steps Happy Mining :)

Welcome to a place where words matter. On Medium, smart voices and original ideas take center stage - with no ads in sight. Watch
Follow all the topics you care about, and we’ll deliver the best stories for you to your homepage and inbox. Explore
Get unlimited access to the best stories on Medium — and support writers while you’re at it. Just $5/month. Upgrade

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store