How to Mine Cryptocurrency with CGMiner on Ubuntu

How to Mine Cryptocurrency with CGMiner on Ubuntu

What Do I Need?

  • [tool]A Dedicated or VPS Linux Server[/tool]
  • [tool]Ubuntu[/tool]
  • [tool]Any USB ASIC[/tool]

What is CGMiner?

[openingText]CGMiner is an open-source ASIC/fpga Bitcoin miner developed for a massive range of platforms, including Windows, Linux, and OS/X. It comprises sophisticated algorithms that are developed with C programming language to utilize the maximum hardware performance to yield a profitable amount of Bitcoin with relative ease; dependent on machine performance, of course. CGMiner doesn’t currently support GPU as it’s no longer able to compensate for the power and the time consumed to mine Bitcoins, thus ASIC has to be used.[/openingText]

  1. [stepName]Install CGMiner[/stepName]
    [step]
      1. Update your operating system:
    sudo apt-get upgrade && apt-get update
    sudo apt-get install autoconf gcc make git 
    libcurl4-openssl-dev libncurses5-dev libtool 
    libjansson-dev libudev-dev libusb-1.0-0-dev

    [stepImage]How to Mine Cryptocurrency with CGMiner on Ubuntu[/stepImage]

    cd /usr/src/
    sudo git clone https://github.com/ckolivas/cgminer.git

    [stepImage]How to Mine Cryptocurrency with CGMiner on Ubuntu[/stepImage]

    cd cgminer
    ./autogen.sh

    [stepImage]How to Mine Cryptocurrency with CGMiner on Ubuntu[/stepImage]

    [/step]

  1. [stepName]Create a New Wallet[/stepName]
    [step]
    1. [howToDirection]There are literally, not figuratively, literally masses of different types of wallets available for storing Bitcoins. For this how-to guide, we’re going lightweight, so we’re going to be installing ‘Electrum’.[/howToDirection]
    2. [howToDirection]Use the following commands to install both QT and Electrum on your server:
      sudo apt-get install python3-pyqt5 libsecp256k1-0 python3-cryptography

      [stepImage]How to Mine Cryptocurrency with CGMiner on Ubuntu[/stepImage]

      sudo wget

      https://download.electrum.org/4.0.9/Electrum-4.0.9.tar.gz[stepImage]How to Mine Cryptocurrency with CGMiner on Ubuntu[/stepImage]

      sudo apt-get install python3-setuptools python3-pip

      [stepImage]How to Mine Cryptocurrency with CGMiner on Ubuntu[/stepImage]

      sudo python3 -m pip install --user Electrum-4.0.9.tar.gz

      [stepImage]How to Mine Cryptocurrency with CGMiner on Ubuntu[/stepImage][/howToDirection]

    1. [howToDirection]After ‘Electrum’ is installed you can run it from your ‘Applications’.[stepImage]How to Mine Cryptocurrency with CGMiner on Ubuntu[/stepImage]
      • Click ‘Next’.

      [stepImage]How to Mine Cryptocurrency with CGMiner on Ubuntu[/stepImage]

      • Take a copy or a photograph of your wallet generation seed. Keep it secret, keep it safe; you’re going to need this.

      [stepImage]How to Mine Cryptocurrency with CGMiner on Ubuntu[/stepImage]

      • Click ‘Next’ and you’ll be asked to retype your newly created seed into the text box. After having done so, click ‘Next’ again.

      [stepImage]How to Mine Cryptocurrency with CGMiner on Ubuntu[/stepImage]

      • Create a password for yourself and click ‘Next’.

      [stepImage]How to Mine Cryptocurrency with CGMiner on Ubuntu[/stepImage]

      • Click ‘Next’.
      • Creation will finish and the application will close. Reopen the application and you’ll see your new wallet.

      [stepImage]How to Mine Cryptocurrency with CGMiner on Ubuntu[/stepImage]

      [/howToDirection][/step]

  1. [stepName]Join a Mining Pool[/stepName]
    [step]
    1. [howToDirection]Nowadays, it’s not profitable to mine Bitcoin alone on a single machine due to the costs involved; hence the pool concept was invented for making it efficient and fast. A pool is a collection of miners who work together to mine coins, and then share the production when the block is found. The fee is paid to the miners who find the blocks. Usually, the payout is available immediately, but it largely depends on the service provider.[/howToDirection]
    2. [howToDirection]Visit http://mmpool.org/register[/howToDirection]
    3. [howToDirection]Create a username and paste your public bitcoin address into the bitcoin textbox.[/howToDirection]
    4. [howToDirection]Return to ‘Terminal’ on your server:
      cd /usr/src/cgminer

      [/howToDirection]

    1. [howToDirection]Connect or plug in your USB ‘ASICMiner Block Erupter’ key into the server. The one pictured below was ordered from Amazon and costs between $120 and $200.[stepImage]How to Mine Cryptocurrency with CGMiner on Ubuntu[/stepImage][/howToDirection]
    1. [howToDirection]Use the following command to get started mining:
      sudo ./cgminer -o stratum+tcp://mmpool.org:3333 -u YOURUSERNAME -p PASSWORD

      [/howToDirection]

    1. [howToDirection]And now, you’re mining Bitcoin. The speed is largely determined by the hash rate per second which is usually indicated with Mh/s, meaning ‘mega hash per second’.[stepImage]How to Mine Cryptocurrency with CGMiner on Ubuntu[/stepImage][/howToDirection]
    1. [howToDirection]To check the progress of your new, and most probably not particularly profitable, mining operation, visit http://mmpool.org/members to confirm the presence of your wallet address.[/howToDirection]
      [/step]

Next Steps

Look out for the next in-coming how-to guide about how to mine using your GPU, which, given how many of us have gaming personal computers, could prove to be a super useful way of utilizing your systems when you’re not using them for anything else.

Conclusion

Personally, I recommend looking into alternatives for your money making enterprises. Unless you’re looking at this for research and development, there’s little-to-no profit to be made from single node mining operations anymore.

  • Check the recommendations for the best VPS and get a suitable one.

How To Examine And Repair A Database in PhpMyAdmin

Over the period of time, database can be corrupted and needs to repaired. This t
less than a minute
Elizabeth Grom
Elizabeth Grom
Hosting Expert

How To Find and Install A New Theme in Drupal 8

This tutorial will help you replace the default Drupal theme with your preferred
less than a minute
Elizabeth Grom
Elizabeth Grom
Hosting Expert

How To Create Views in Drupal 8

This tutorial is compiled to help you create a view in your Drupal 8 platform.
less than a minute
Elizabeth Grom
Elizabeth Grom
Hosting Expert

How To Set up a VSFTPD Server on a CentOS 7 VPS or Dedicated Server

Brief Description FTP is usually insecure exposing clear-text passwords, usernam
less than a minute
Eliran Ouzan
Eliran Ouzan
Web Designer & Hosting Expert
Click to go to the top of the page
Go To Top
HostAdvice.com provides professional web hosting reviews fully independent of any other entity. Our reviews are unbiased, honest, and apply the same evaluation standards to all those reviewed. While monetary compensation is received from a few of the companies listed on this site, compensation of services and products have no influence on the direction or conclusions of our reviews. Nor does the compensation influence our rankings for certain host companies. This compensation covers account purchasing costs, testing costs and royalties paid to reviewers.