- How to mine Monero on Windows or Linux (Fedora or Ubuntu)
- Before you begin mining Monero
- Mining Monero on Windows using MoneroSpelunker
- Mining Monero on Fedora 24 and above
- Mining Monero on Ubuntu 14 and above
- Checking your mining earnings
- How To Mine Monero (XMR) with your CPU on Linux
- How to Mine Monero:
- Creating a Monero Wallet
- Picking a Monero Mining Pool
- Note: Mining Monero on Windows
- Downloading the Miner for Linux
- Start Mining Monero
- Monitoring your Hashrate
- Calculating Profits mining Monero
- Further Reading
- 18 thoughts on “How To Mine Monero (XMR) with your CPU on Linux”
- Xmr cpu miner linux
How to mine Monero on Windows or Linux (Fedora or Ubuntu)
Monero mining is based on a proof-of-work algorithm called CryptoNight. This algorithm was especially designed to be as inmuned to ASIC miners as possible; therefore, it is feasible to mine Monero using consumer CPU and GPU hardware. This is one of the big advantages of Monero over Bitcoin; in terms of mining decentralization, anyone with a PC can start mining Monero straight away and still be able to make some profit without having to break the bank to buy expensive ASIC based mining hardware. In this tutorial, you will learn to mine Monero on Windows and on two flavours of Linux, Fedora and Ubuntu using CPU.
Visit our How to mine Monero with GPU guide if you are rather interested to mine Monero using GPU instead.
If you would like to know how much can you earn by mining Monero then use our Monero mining calculator.
Before you begin mining Monero
Mining Monero on Windows using MoneroSpelunker
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.
Mining Monero on Ubuntu 14 and above
Checking your mining earnings
To check how much Monero you have earned through your mining efforts, enter your wallet address into the «Lookup» box at the mining pool site. It will tell you how much you have earned, and how much has been paid out so far.
Note that each mining pool has a payment threshold, which saves on transaction fees by only paying out once you have mined a certain amount of Monero. Be prepared for it to take days or weeks to receive your first payment, depending on the speed of your computer hardware.
Note that with some pools, your Hash Rate will be reported as zero for most of the time, until you suddenly submit a ‘share’ to the pool from your mining efforts. You will temporarily see your Hash Rate reported, after which it will return to zero. This is normal for some pools, and you do not need to worry that something is not working correctly. As long as after a while you see the «total hashes submitted» figure increase, then your mining setup is working.
Источник
How To Mine Monero (XMR) with your CPU on Linux
Monero is a cryptocurrency similar to Bitcoin and in this blogpost we’re going to have a look at how to mine some Monero through a command line based miner on Linux.
In contrast to Bitcoin and Ethereum a strong mining GPU is not impacting the payoffs as much since the cryptonight algorithm is CPU friendlier.
Technically you can run the miner anywhere it compiles, but Linux is probably the most likely candidate for your private mining operation since Linux servers are widely available in the shape of virtual private servers for you to quickly try it out.
Disclaimer: unless you have a lot of CPUs at your disposal it might take a while until you reach a payout.
How to Mine Monero:
This article will go over:
- Creating a Monero Wallet
- Picking a mining pool
- Downloading and copiling the miner
- Start mining Monero
- Monitoring your hashrate
Creating a Monero Wallet
You can either create a Monero Wallet by downloading the official client or using an online wallet such as mymonero.
Note that the official client brings an about 20-30 GB download to store the entire Monero blockchain on your computer as well.
Picking a Monero Mining Pool
To get started, I suggest you pick a mining pool from any of the mining pool lists, I went with xmrpool.net, but many of them run the same software on the backend and to monitor your mining efforts.
A mining pool combines the efforts of many miners and increases your chance of payouts, because you find new blocks quicker together. With the PPLNS pools you’ll be paid based on how much work you contributed to the new block. If you don’t have your own mining farm, but just run the miner on a couple of computers or even one, I’d recommend going with that option.
Note: Mining Monero on Windows
If you want a graphical user interface, you can make use of the Monero Spelunker GUI and get up and running right after creating your wallet.
Downloading the Miner for Linux
This tutorial is for the cpuminer-multi, you can also pick other miners depending on your CPU or GPU you want to use.
First, let’s install the require packages for Ubuntu, Linux Mint or other Debian-like systems:
On Arch Linux you should have most pacakges available, else install them with pacman or pacaur .
Now let’s download the miner with git and change into the directory:
It comes with a useful script called autogen.sh :
If the previous commands throw an error, try the following:
Now the binary minerd should be available system wide. You can test that out by typing:
Start Mining Monero
In order to start mining monero you can just run the below command:
MININGPOOL and PORT depend on your miningpool.
Your WALLET_ADDRESS you either get from your wallet GUI or from your mymonero account.
MINER_NAME is up to you to define, I usually keep it to the host name of the machine.
By running the above command you will see output like:
Whenever it states accepted that means that your calculations where accepted into the overall mining effort and should be visible in the dashboard of your mining pool.
Now you actually can wait for your machines to have accumulated enough shares to be considered as a large enough share of the payout in Monero to the wallet you specified.
Backgrounding the miner can be done by using screen or appending & to the command.
To kill the miner again you can use something like killall minerd .
Monitoring your Hashrate
Your mining pool will usually display an interface that shows how many hashes at once you’re going through per second. For each individual miner you can always check the output of the terminal.
If you’re curious how quickly you possibly will be rewarded by your mining pool, you can check out this helpful Monero mining calculator. You can even pick different options for solo mining, pool mining and if you rent or own the hardware.
Calculating Profits mining Monero
There are different profitability calculators online and they should all be taken with a grain of salt, since both difficulty of the network, amount of miners and some other factors will play a role in the development of the currency.
Further Reading
Monero recently sparked the interest of a lot of people, not least because a browser based miner exists, written in web assembly, which allows visitors of your website to donate Monero (mining effort) to you. I’ve covered the topic briefly: Testing Coin Hive Crowd Source Monero Mining.
Update: I’ve also tested the xmr-stak miner!
Thank you for reading! If you have any comments, additions or questions, please leave them in the form below! You can also tweet them at me
If you want to read more like this, follow me on feedly or other rss readers
18 thoughts on “How To Mine Monero (XMR) with your CPU on Linux”
Thank you very much, I started to mine monero. I read several how to, but yours is very understandable and clear.
Do I have to login into the pool to start minning? Or just by putting the address and port I will start to get my calculations accepted?
Your address is enough, no need to log in. 🙂
I see my minerd working properly I believe…
[2018-01-20 06:32:13] accepted: 24/24 (100.00%), 35.64 H/s at diff 1650 (yay. )
[2018-01-20 06:32:19] accepted: 25/25 (100.00%), 35.67 H/s at diff 1650 (yay. )
[2018-01-20 06:32:29] accepted: 26/26 (100.00%), 36.00 H/s at diff 1650 (yay. )
[2018-01-20 06:32:53] Pool set diff to 1950
[2018-01-20 06:32:53] Stratum detected new block
[2018-01-20 06:32:57] accepted: 27/27 (100.00%), 35.98 H/s at diff 1950 (yay. )
[2018-01-20 06:33:21] accepted: 28/28 (100.00%), 35.52 H/s at diff 1950 (yay. )
[2018-01-20 06:33:26] Stratum detected new block
I am using https://xmrpool.net. How do I verify on that site that I’m doing everything correctly ? I tried to “Login” using my -u and -p parameters for the “payment address” and “password” respectively. I’m getting an error “Please check your login details”.
btw, great instructions… I just had to run some additional commands to get my linux up to date
sudo apt-get update
sudo apt-get upgrade
sudo apt-get install -f
your worker name can contain your password like this: -p desktop-machine:public@jonathanmh.com
Thank you for the response Jonathan.
FYI.. for the ./minerd command, i used -p one:myemail@gmail.com…. then on the website https://xmrpool.net for Login, the password I used was only ‘myemail@gmail.com’ and it worked.
Do you earn significantly more than with coinhive, with tools like for instance https://authedmine.com/media/miner.html?key=B8CIiMbRHTRXFE0DPsmCPtuJbo4JYoep ?
i WOULD LIKE TO MINE ON CPU’S WITHOUT aes-ni. eVERYTHING i HAVE TRIED FAILS AND COMES UP WITH AN ERROR SAYING THAT i DON’T HAVE aes-ni. i KNOW THERE IS A WAY, BUT i CAN’T FIND IT.
I got the following log:
[2018-02-14 01:39:35] Using JSON-RPC 2.0
[2018-02-14 01:39:35] Starting Stratum on stratum+tcp://mine.moneropool.com:3333
[2018-02-14 01:39:35] 3 miner threads started, using ‘cryptonight’ algorithm.
[2018-02-14 01:39:35] Stratum connection failed: Could not resolve host: mine.moneropool.com
[2018-02-14 01:39:35] . retry after 10 seconds
[2018-02-14 01:39:45] Stratum connection failed: Could not resolve host: mine.moneropool.com
[2018-02-14 01:39:45] . retry after 10 seconds
[2018-02-14 01:39:55] Stratum connection failed: Could not resolve host: mine.moneropool.com
[2018-02-14 01:39:55] . retry after 10 seconds
[2018-02-14 01:40:05] Stratum connection failed: Could not resolve host: mine.moneropool.com
[2018-02-14 01:40:05] . retry after 10 seconds
[2018-02-14 01:40:15] Stratum connection failed: Could not resolve host: mine.moneropool.com
How can I solve this?
One of the following in all probability
The machine was either not connected to the internet.
The address mine.moneropool.com:3333 does not exist on port 3333
You have a firewall on your machine or at your location that is blocking that domain and or a combination of that domain and that port 3333.
If ur running this from your local machine and suspect the firewall is not on your machine but perhaps in your building, go to starbucks or an internet cafe, if u can.
If you’re running on from ubuntu, know that sometimes ufw firewall is installed automatically for you by some ISP’s and it may block outgoing connections on port 3333
Can someone help me to install properly cpuminer-multi on Pi3 box.
When I try to execute the command: sudo make install I am getting the following error:
/cpuminer-multi $ sudo make install
Making install in compat
make[1]: Entering directory ‘/home/pi/cpuminer-multi/compat’
make[2]: Entering directory ‘/home/pi/cpuminer-multi/compat’
make[3]: Entering directory ‘/home/pi/cpuminer-multi/compat’
make[3]: Nothing to be done for ‘install-exec-am’.
make[3]: Nothing to be done for ‘install-data-am’.
make[3]: Leaving directory ‘/home/pi/cpuminer-multi/compat’
make[2]: Leaving directory ‘/home/pi/cpuminer-multi/compat’
make[1]: Leaving directory ‘/home/pi/cpuminer-multi/compat’
make[1]: Entering directory ‘/home/pi/cpuminer-multi’
gcc -DHAVE_CONFIG_H -I. -pthread -falign-loops=16 -falign-functions=16 -falign-jumps=16 -falign-labels=16 -Ofast -flto -fuse-linker-plugin -funroll-loops -fvariable-expansion-in-unroller -ftree-loop-if-convert-stores -fmerge-all-constants -fbranch-target-load-optimize2 -fsched2-use-superblocks -maes -MT minerd-cpu-miner.o -MD -MP -MF .deps/minerd-cpu-miner.Tpo -c -o minerd-cpu-miner.o `test -f ‘cpu-miner.c’ || echo ‘./’`cpu-miner.c
gcc: error: unrecognized command line option ‘-maes’; did you mean ‘-mapcs’?
Makefile:573: recipe for target ‘minerd-cpu-miner.o’ failed
make[1]: *** [minerd-cpu-miner.o] Error 1
make[1]: Leaving directory ‘/home/pi/cpuminer-multi’
Makefile:776: recipe for target ‘install-recursive’ failed
make: *** [install-recursive] Error 1
I really would appreciate for your feedback what I am doing wrong and how to solve it.
Thanks a lot in advance for your help.
I have configured and seem to be getting results as below:
[2018-03-10 08:47:57] accepted: 73/73 (100.00%), 74.87 H/s at diff 1740 (yay. )
[2018-03-10 08:48:18] accepted: 74/74 (100.00%), 77.94 H/s at diff 1740 (yay. )
[2018-03-10 08:48:32] Stratum detected new block
[2018-03-10 08:48:34] accepted: 75/75 (100.00%), 71.23 H/s at diff 1740 (yay. )
But I am unable to login at https://xmrpool.net/.
They need “Payment Address” which I thought is the Account Address (Public) at https://mymonero.com/. Is this true?
On Password they need an email Identifier so I supplied my email address.
Could you explain exactly how to login? Thanks.
Repository mentioned above is very old and seems not maintained. Are you sure that the miner supports new version of monero?
That’s exactly my problem, I think Monero hard-forked and this repository maintainer left it for dead…
I keep getting 100% rejected shares 🙁 This is the only miner that compiles on some of my cpu because they are older… Wish the maintainer would fix it…!
Sir how to add password for the pool login
hello how I have a computer that has 2 GPU AMD RX580 cards and an AMD ryzen 7 processor and wish to mine with ubuntu with the 3 prerifericos. What do you recommend to start?
Thanks for this! One of the better guides I saw for Linux
Источник
Xmr cpu miner linux
XMRig is a high performance, open source, cross platform RandomX, KawPow, CryptoNight and AstroBWT unified CPU/GPU miner and RandomX benchmark. Official binaries are available for Windows, Linux, macOS and FreeBSD.
- CPU (x64/ARMv8)
- OpenCL for AMD GPUs.
- CUDA for NVIDIA GPUs via external CUDA plugin.
- Binary releases
- Build from source
The preferred way to configure the miner is the JSON config file as it is more flexible and human friendly. The command line interface does not cover all features, such as mining profiles for different algorithms. Important options can be changed during runtime without miner restart by editing the config file or executing API calls.
- Wizard helps you create initial configuration for the miner.
- Workers helps manage your miners via HTTP API.
Источник