Cryptocurrencies are rising in reputation. These are digital or digital currencies which are decentralized and can be utilized to commerce or spend utilizing blockchain expertise. Lots of them are aimed to boost privateness and anonymity, though their success different. A couple of of those currencies permit public viewing of all transactions, whereas others make privateness non-obligatory. And nonetheless, others maintain the privateness characteristic strictly implicit.
When most of us consider cryptocurrencies, Bitcoin is often the primary one which involves thoughts. It was one of many first of its form, utilizing peer-to-peer expertise to permit customers to make funds with their cash. However there's one other foreign money that has achieved a excessive stage of recognition and acceptance, primarily for its privacy-oriented options. This one is named Monero. This text explains the important thing ideas, options, and challenges of Monero or XMR.
In short, Monero is more privacy-oriented crypto than Bitcoin, so it has very bright future. We are going to mine Monero (XMR) from our Linux system. In this article we are going to use Kali Linux but our this method will work on any Debian based Linux distributions like Ubuntu, Linux Mint, ElementaryOS etc.
We know to mine Cryptocurrencies we need have a mining rig that contains lots of GPU's. But in the case of mining Monero we can mine it from our daily using computers or even from laptops. Yes Monero can be mined from CPU. Obviously one or more GPU will give us more mining hash speed but we can easily do it from CPU.
Let we start mining Monero on our Linux system, First of all we need to update our system by using following command:
After the updating process is complete, we need to install Monero wallet on our Linux system.
Installing Monero Wallet
Before starting mining Monero we need to have a wallet for Monero. Wallet will save our mined Monero by using our Monero address. We don't need to follow this steps if we already have a Monero address (Almost every exchanges will provide a address). We can also skip this step if we have Monero wallets on our mobile. MyMonero wallet app is available on Web, Linux, Google Play Store.
First of all we need to go to the website where Monero developers provide us easy graphical based XMR (Monero) based wallet. First we need to go here. Then we need to download the Linux 64bit package by clicking there. Shown in the following screenshot:
A compressed file with almost 120MB size will be download in our Downloads folder. Then we need to open our terminal window and type following command to change our directory to Downloads directory.
Now we need to type following command to extract downloaded compressed file:
Now we need to go inside our extracted folder by using following command:
We entered on the folder here we can see the list of files by using ls command, as shown in the following screenshot:
On the above screenshot we can see monero-wallet-gui.AppImage file. We need to execute this file by using following command:
Then the GUI of the wallet app will come in front of us as shown in the following screenshot:
Here it asks do we want to register, we click on 'Yes'. Then It will ask for choosing the language.
After choosing the language we need to choose the installation type. For being a easy method we are going with easy mode, by clicking on 'Simple Mode'.
After choosing 'Simple mode' we need to tick ✅ on 'Privacy implications' then click on 'Next'. Shown on screenshot below.After that we got the Welcome menu. From here we can create a new Monero wallet, by clicking on 'Create a new wallet'.After clicking the new wallet. We a window as shown in the following screenshot:
Here we need to set our wallet name and wallet location. After that we get a 'Mnemonic seed'. This mnemonic seed is nothing but some random words, but we need this if we want to backup or restore our wallet. This will be treated as password recovery. We need to note down it (digitally or in a physical notepad) and keep it secret.
Then we need to click on 'Next'.
Here we need to choose a strong password for our wallet. Then we need to click on 'Next'.
Here we can check and finish our setup by clicking on 'Create wallet'. After that we need to provide our password for wallet and our Monero or XMR wallet will open in front of us, as shown in the following screenshot:
Here we need to go to the 'Receive' option. After we in the receive we can see the QR code for our wallet. We can also see some options to copy our Monero XMR address. On the following screenshot we have highlighted the points from where we can copy our address.
So, we got our Monero (XMR) wallet and a receiving address for XMR. Now if we already have an wallet address (Some wallets like this are available on mobile application stores like MyMonero or exchanges provide us receiving address) then we can skip the above steps.
Installing XMR Mining Tool on Linux
Mining from a mining poll is the easiest way for beginners. Pools charges 1% or 2% as fee but it is completely fine because it becomes so easier than solo mining. Let we first download the mining tool then we learn about the pool.
For pool mining there is awesome tool called xmr-stak. Before download and set this up we install all the requirements for it by applying following command:
After installing these packages we need to go to the release page of xmr-stak.
After a little bit of scrolling we got the download options for Linux as shown in the following screenshot:
By clicking on above highlighted area we can download the compressed file on our Downloads directory.
After downloading we need to compress the file from command line or we just right click and choose 'Extarct Here'.
After clicking on it it will be uncompressed and a folder will appear on our this directory.
After extracting that we can see a new extracted folder on the directory as shown in the following screenshot:
Inside the folder we can see a file an executable file. To execute this file we need to open our terminal here by right clicking on blank space, as we can see in the following screenshot:
After that a terminal window will open in front of us.
We are done here. Now we need to start the mining here. As we told previously that we need a mining pool. Let we find a mining pool then we can start mining by using a single command.
Finding Monero Mining Pool
This is going to be very easy. First of all we need to search for mining pools for XMR or Monero on Google. There are some top XMR mining pools like nanopool minexmr supportxmr etc.
We are not promoting any of these services, for an example we choose minexmr. We can choose any other mining pools. We should check the hash rate of the server and the minimum payout (MineXMR will pay us when we reach on 0.0004 XMR).
On the mining guide of MineXMR pool we can find a list of mining pool servers and port numbers as we can see in the following screenshot:
We need to choose a server that is close to our location. If we are in Canada then we should Canada (East Coast) server. We can choose any server but closer server will provide us a very good hash rate. For our current location we are choosing Singapore server that will be closest to us and we should choose the standard port i.e. 4444 for every server.
Mine Monero (XMR) on Linux
After selecting the server we can get back to our terminal window where we left, and to start the Monero mine we just need to run following command on our terminal.
./xmr-stak-rx --currency monero -o <pool-server>:4444 -u <our wallet addres>
By the above command we just need to put our mining pool server and our wallet address. So in our case our command will be as following:
After applying the above command xmr-stak will ask if we want to use simple setup we need to press Y for yes. Then it prompt for configuration txt file and we need to just press the Enter ⤶ key. Then it also prompt for password we must leave the password blank and press Enter ⤶ key.
Then our mining process will be start as we can see in the following screenshot. But it may take a minute to start the mining process. New blocks and difficulty will detect. We may get outputs like "MEMORY ALLOC FAILED: mmap with HUGETLB failed, attempting without it (you should fix your kernel)", but that is completely fine we need wait some time.
After the mining starts we can see output like following screenshot:
Here we can press 'H' on keyboard to see the hash rate and we can press 'R' for reports, also 'C' to check the connection.CPU and GPU Uses and Changing
xmr-stak automatically detect cores of our processor and our GPU and use them. If we need any modification like we don't want to use all the cores of our processor or if we we don't want to our CPU and use our GPU only.
In such cases we need to go the extracted xmr-stak directory. Now we can see some files here, as we can see in the following screenshot:
We can check how we can modify these configurations here.
Now on MineXMR website we can check our mining job's progress and withdraw our cryptocurrency.
On the MineXMR Dashboard we need to paste our Monero wallet address to see our mining status.
On the above screenshot we can see our statistics of mining. We can see our hashrate, balance and pool hashrate here. Many more data will show here.On the payment section we can see that we have 0.000237 XMR we can set a threshold when the threshold completed Monero will be sent on our wallet address or we can manually Payout it on our provided address after reaching 0.004 XMR.
Extra Tip
Sometimes we need to mine for a long time. That time our system might got very hot. Hot means not sexy here. High temperature might damage our system. We need to monitor our system's temperature always. T do that we open another terminal alongside the mining terminal and type following command to download packages for temperature:
Then we need to type following command to check our system temperature in every 2 seconds:
We can place this terminal on a side of mining terminal tht we can check both terminals same time.
On the smaller terminal we can see the temperatures of our every processors (Core 0 is first core and Core 3 is the fourth core). We can also see high and critical temperatures also here.
Conclusion
This is how we can mine Monero or XMR on our Linux system. We have checked this also on a low processor (i5 3rd Gen) Dual-Core CPU without GPU it is working perfectly, but hash rate is low. High hash rate will increase our mining speed.
Love our articles ?
Make sure to follow our free email subscription to get all our articles directly on inbox. We are also available on Twitter and GitHub, we post article updates there.
To join our family, join our Telegram Group. We are trying to build a community for Linux and Cybersecurity.
For anything we always happy to help everyone on the comment section. As we know our comment section is always open to everyone. We read each and every comment and we always reply.