How To Get CPUminer Running Fast On Unix Systems

For many people, getting Cpuminer or minerd up and running on a newly installed VPS or command line system can be frustrating when you don't know where to start. Well here is how to quickly and efficiently get cpuminer up and running in a matter of minutes on Debian and Ubuntu systems. You may also do this on RHEL or CentOS operating systems but it may be a little different. I will post a guide here soon for them specifically.

Open your SSH shell or command terminal on your VPS or whatever you wish to install the cpuminer on.

Type the following to get it running in seconds (make sure you are root or sudo bash):

apt-get update
apt-get upgrade
apt-get install make gcc m4 automake libevent-dev zlibc zlib1g-dev libjansson-dev libcurl4-openssl-dev git

This will install the required dependencies for your system in order for the cpuminer to function properly. Note: these dependencies are mostly what you need for most if not all P2P wallets.

Then you want to get the miner with these codes:

git clone git://
cd cpuminer
./configure CFLAGS="-O3"

Now voila! We have the cpuminer installed. If you are on a vps that allows much resource use then you can execute the miner with full power. BUT–If you need to limit the resource that the miner is using then execute the miner with only 1 thread. I have done this with even the cheapest of VPS providors and on one thread, they do not complain.

An example for you to go by to start your miner is as follows:

cd cpuminer
./minerd --url --userpass usernamehere:password -t 1

If you want to run this miner in the background while you are away, say for SSH instances, then you will need tmux. I prefer tmux over screen for reliability reasons.

To do this execute the following:

apt-get install tmux
##Once tmux is installed you will execute tmux (make sure you are already inside the cpuminer directory).
./minerd --url --userpass usernamehere:password -t 1

The miner will start hashing away. Now here is what you need to do for tmux.

Press CTRL+B then hit the letter “D”. This will detach the tmux session from your ssh, and it will continue to run in the background. Just to make sure it is running. Type “top” and you should see “minerd” as the top process.

You are done, and you can close out of the SSH session.

When you want to return to the tmux session (if you wish) you can do so by executing the following:

tmux attach -t 0

And you will have your session back. Tmux works with :threads“ hence the “t”. So if you have multiple sessions of tmux you can open them iwth their corresponding numbers, tmux attach -t 0, tmux attach -t 1, etc.

I hope you have learned something and I wish you happy hashing!


QR Code
QR Code getting-cpuminer-runningonunix-quickly (generated for current page)