how to mine bitcoin using xmrig on linux

User avatar
root
Site Admin
Posts: 6372
Joined: Sun Feb 20, 2022 9:53 am
Contact:

how to mine bitcoin using xmrig on linux

Post by root »

I will show you how to do CPU mining using Linux, using xmrig and NiceHash or Cudominer

The process will take about 10 minutes for you to start mining bitcoin into your new bitcoin wallet.

download and extract xmrig on your linux server (in /usr/src/):

Code: Select all

wget https://github.com/xmrig/xmrig/releases/download/v6.17.0/xmrig-6.17.0-linux-static-x64.tar.gz
gunzip -c xmrig-6.17.0-linux-static-x64.tar.gz |tar -x
cd xmrig-6.17.0
no compiling is necessary.

execute the command ./xmrig and it should start mining

./xmrig
User avatar
root
Site Admin
Posts: 6372
Joined: Sun Feb 20, 2022 9:53 am
Contact:

Re: how to mine bitcoin using xmrig

Post by root »

xmrig running.jpg
xmrig running.jpg (274.62 KiB) Viewed 2520 times
If it runs, it should look like this.

Notice under Pool #1, it says "xmrig.com". This is the pool for the software developer. If you let it run to process 1 fractional bitcoin, he will receive 1 fraction of a penny.

Keep the software running for a bit to see how fast your server is, and to see if it mines the currency.

Next, you will edit the config file to make it work with NiceHash, and then you will create your NiceHash account, and add your bitcoin wallet, to start mining your own currency.
User avatar
root
Site Admin
Posts: 6372
Joined: Sun Feb 20, 2022 9:53 am
Contact:

Re: how to mine bitcoin using xmrig

Post by root »

xmrig config.jpg
xmrig config.jpg (33.16 KiB) Viewed 2517 times
Edit the file called "config.json", with an editor such as vi

Search for the donate url for xmrig, in the Pools section

Change the algo from null to "rx/0", using quotes

If you do not have wallet addresses or usernames, just use mine to test with. You can change it later.

for NICEHASH mining:
Change the url to 34.149.22.228:9200
Change the user from YOUR_WALLET to 3J6PAFTdFYJYRaKYfZR3ciVHLMZQAFNgEB
if you already have a nicehash wallet, enter your nicehash wallet address in the YOUR_WALLET field

for CUDOMINER:
Change the url to stratum.cudopool.com:30010
Change the user from YOUR_WALLET to "o:683423:n:WORKER_NAME"
if you already have a cudominer account, enter your cudominer account name in the YOUR_WALLET field

Change pass to "x"

save it, and run ./xmrig

if it works, you will then create your own account with nicehash or cudominer, and it will assign you a wallet address, which you will put in the config
User avatar
root
Site Admin
Posts: 6372
Joined: Sun Feb 20, 2022 9:53 am
Contact:

Re: how to mine bitcoin using xmrig

Post by root »

xmrig config nicehash.jpg
xmrig config nicehash.jpg (29.65 KiB) Viewed 2514 times
cudopool mining xmrig.jpg
cudopool mining xmrig.jpg (23.59 KiB) Viewed 2507 times
This what the config file looks like with a nicehash pool, or cudopool, and a test currency account.

once it is saved, type ./xmrig to start like so:

./xmirg
User avatar
root
Site Admin
Posts: 6372
Joined: Sun Feb 20, 2022 9:53 am
Contact:

Re: how to mine bitcoin using xmrig

Post by root »

xmrig mining example.jpg
xmrig mining example.jpg (276.83 KiB) Viewed 2514 times
If everything is set up properly, you should see something like what is shown above.

The NiceHash IP address, port, and algo should match what you entered into the config file

It should run until it says "accepted" at least 1 time, which verifies you have completed 1 job.
User avatar
root
Site Admin
Posts: 6372
Joined: Sun Feb 20, 2022 9:53 am
Contact:

Re: how to mine bitcoin using xmrig

Post by root »

nicehash mining address.jpg
nicehash mining address.jpg (27.07 KiB) Viewed 2514 times
Create an account with NiceHash at https://www.nicehash.com/

Click "MINING ADDRESS" to see your bitcoin wallet mining address.

Copy this value.

Go to the xmrig config.json file

enter this address as your 'user', replacing the test address

rerun xmrig

./xmrig
User avatar
root
Site Admin
Posts: 6372
Joined: Sun Feb 20, 2022 9:53 am
Contact:

Re: how to mine bitcoin using xmrig on linux

Post by root »

cudominer connect.jpg
cudominer connect.jpg (32.6 KiB) Viewed 2505 times


Create an account with cudominer at https://www.cudominer.com/?a=1FpNipbPA

go to "CONNECT A DEVICE"
User avatar
root
Site Admin
Posts: 6372
Joined: Sun Feb 20, 2022 9:53 am
Contact:

Re: how to mine bitcoin using xmrig on linux

Post by root »

cudominer user.jpg
cudominer user.jpg (41.18 KiB) Viewed 2505 times
Select "ASIC", and you will see your username and password, which goes into the config.json file.

it will look like this, but a different id number:

o:683423:n:WORKER_NAME

put your username, exactly as is, into the config file.
User avatar
root
Site Admin
Posts: 6372
Joined: Sun Feb 20, 2022 9:53 am
Contact:

Re: how to mine bitcoin using xmrig on linux

Post by root »

The advantage to cudominer, is that you can refer other people, such as your friends, and earn a small portion of their mining revenue

The advantage of NiceHash, is that it has nice Windows software for a solo user, but linux command line and gui support is not easy.
User avatar
root
Site Admin
Posts: 6372
Joined: Sun Feb 20, 2022 9:53 am
Contact:

Re: how to mine bitcoin using xmrig on linux

Post by root »

You can see xmrig currency algorithms here:

https://xmrig.com/docs/algorithms
Post Reply

Return to “Bitcoin Mining”

Who is online

Users browsing this forum: No registered users and 3 guests