> For the complete documentation index, see [llms.txt](https://apool.gitbook.io/help/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://apool.gitbook.io/help/quai-pool-tutorial/quai-linux-mining-tutorial.md).

# Quai Linux Mining Tutorial

**1.  Acquire sub-account**

In order to earn quai, one must mine to a sub-account. Head over to <https://www.apool.top> to finish email registration.&#x20;

<figure><img src="https://173695165-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FhcaIJhxZbNgQ58zWSXWs%2Fuploads%2Fn2fuLLtajayCF3hT1sYl%2Fimage.png?alt=media&amp;token=6b3554b8-dbc4-4153-8d37-75ecdefc7314" alt=""><figcaption></figcaption></figure>

Apool will allocate a sub-account automatically under your name.  Check out your sub-account name in 'My miners' page.

<figure><img src="https://173695165-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FhcaIJhxZbNgQ58zWSXWs%2Fuploads%2Fmi5Hk1TGUVVE6Oi8ydCa%2Fimage.png?alt=media&amp;token=ca94e196-6a68-4b7e-9221-494afd686bc4" alt=""><figcaption></figcaption></figure>

&#x20;**2. Download the mining software**

* Download link：<https://github.com/apool-io/quaiminer/releases>

<figure><img src="https://173695165-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FhcaIJhxZbNgQ58zWSXWs%2Fuploads%2Fn2QsI3wF587rWj24bZpS%2Fimage.png?alt=media&amp;token=7a979035-17c5-4a5f-8d4d-c093a97c75d1" alt=""><figcaption></figcaption></figure>

* Extract the file with the comand：

```
tar zxf apoolminer_linux_quai_v3.3.1.tar.gz
```

&#x20;**3. Modify the configuration file miner.conf and change the account to your own.**

<figure><img src="https://173695165-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FhcaIJhxZbNgQ58zWSXWs%2Fuploads%2FgNoupP6c62DCpuA1BWh0%2F53f42d5862f2705f07a16a859dd78c6.png?alt=media&amp;token=67ca5f7a-f579-4461-954f-566a78815dd1" alt=""><figcaption></figcaption></figure>

**4.apoolminer miner.conf Parameter Description**

<table><thead><tr><th width="203">Param</th><th>Description</th></tr></thead><tbody><tr><td>algo=&#x3C;qubic/aleo></td><td>Specify algorithm, default configuration is qubic , <strong>Required</strong></td></tr><tr><td>account=&#x3C;string></td><td>Specify your sub-account(CP_xxx) in pool mining or Specify your wallet address in solo mining, <strong>Required</strong></td></tr><tr><td>pool=&#x3C;url:port></td><td>Specify the proxy address, <strong>Required in pool mining</strong></td></tr><tr><td>solo=&#x3C;url:port></td><td>Specify the proxy address, <strong>Required in solo mining</strong></td></tr><tr><td>worker=&#x3C;name></td><td>Specify the worker name. The name consists of numbers and letters and cannot exceed 15 characters in length</td></tr><tr><td>gpu=&#x3C;indexes></td><td>Specify the index of GPU. If you’re only running on specific GPUs, please spell out explicitly, example: gpu=0,1,2, If you run all GPUs, you don’t need to configure them.</td></tr><tr><td>thread=&#x3C;num></td><td>Specify the number of CPU thread [default: 0, use all threads]</td></tr><tr><td>cpu-off=&#x3C;true/false></td><td>If you don’t want to use CPU, please configure it to True.</td></tr><tr><td>gpu-off=&#x3C;true/false></td><td>If you don’t want to use GPU, please configure it to True.</td></tr><tr><td>xmr-gpu-off=&#x3C;true/false></td><td>If you don't want to use the GPU during XMR mining time, please set this option to True.</td></tr><tr><td>xmr-cpu-off=&#x3C;true/false></td><td>If you don't want to use the CPU during XMR mining time, please set this option to True.</td></tr><tr><td>xmr-thread=&#x3C;num></td><td>Number of CPU threads to use during XMR mining time</td></tr></tbody></table>

**Configuration file example**

* Configuration files for mining with GPU (Recommended mining configuration for all resources)
* Configuration files for mining with GPU only

  ```
  algo=quai
  account=CP_XXX
  pool=quai.hk.apool.io:3335

  worker = my_worker
  #cpu-off = true
  #thread = 4
  #gpu-off = true
  #gpu = 0,1,2
  ```

**5.Run and shutdown**

* #### Select the execution script according to your needs

- [ ] &#x20;<mark style="color:red;">Manually operated Start command</mark>

<figure><img src="https://173695165-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FhcaIJhxZbNgQ58zWSXWs%2Fuploads%2FOgibOFiCY3QRkvqWz1O5%2Fimage.png?alt=media&amp;token=72191df8-4c8d-4b17-8edb-63d915f4ec33" alt=""><figcaption></figcaption></figure>

* If you do not need to automatically upgrade apoolminer, you can execute the run.sh script

```
bash run.sh
```

**6.** View apoolminer log

```
tail -f quai.log
```

<figure><img src="https://173695165-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FhcaIJhxZbNgQ58zWSXWs%2Fuploads%2FPWwzjXEzOuzaAwq5rsez%2Fec476bc378cfe05a357fdf58e82fcdc.png?alt=media&amp;token=c016a4a2-916a-4694-8ac9-42b8a5792fa6" alt=""><figcaption></figcaption></figure>

**7.**&#x73;hutdown apoolminer command

```
killall -9 apoolminer
```

**8. Watch the Statistics and earn Quai on Apool**

<https://quai.apool.io/myMiner>
