> 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/qubic-pool-tutorial/qubic-linux-mining-tutorial.md).

# Qubic Linux Mining Tutorial

**1.  Acquire sub-account**

In order to earn qus, one must mine to a sub-account. Head over to [https://www.apool.io ](https://www.apool.io/)to finish email registration.&#x20;

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%2F6wlzyyOLADp1FfwOFP5n%2F%E5%BE%AE%E4%BF%A1%E5%9B%BE%E7%89%87_20240410112842.png?alt=media&amp;token=fac31930-c33c-4923-8d66-10bda5e427e6" alt=""><figcaption></figcaption></figure>

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

* Download link：[https://github.com/apool-io/apoolminer/releases](qubic2.hk.apool.io:3334)

<figure><img src="https://173695165-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FhcaIJhxZbNgQ58zWSXWs%2Fuploads%2FdKpFDRV4Ys18wmOztmWL%2Fimage.png?alt=media&amp;token=8af91553-3737-4a34-9943-7e35925240a2" alt=""><figcaption></figcaption></figure>

* Extract the file with the comand：

```
tar -xvf apoolminer_linux_v2.4.3.tar
```

&#x20;**3. Configure the mining parameters**

Open the configuration file according to your mining type:

* Mining with CPU only

```
nano run_qubic_cpu.sh
```

<figure><img src="https://173695165-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FhcaIJhxZbNgQ58zWSXWs%2Fuploads%2FU26o10GOuUmlQ7uSMjA9%2Fimage.png?alt=media&amp;token=15362b6f-ddef-4237-a5bc-e38267c22098" alt=""><figcaption></figcaption></figure>

* Mining with GPU only

```
nano run_qubic_gpu.sh
```

<figure><img src="https://173695165-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FhcaIJhxZbNgQ58zWSXWs%2Fuploads%2FgeUTBDMpJCRfOP801C8s%2Fimage.png?alt=media&amp;token=2f031a1f-990e-40de-ba8d-1ce81c6c6489" alt=""><figcaption></figcaption></figure>

* Mining with GPU and CPU

```
nano run_qubic_all.sh
```

<figure><img src="https://173695165-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FhcaIJhxZbNgQ58zWSXWs%2Fuploads%2Fs3IewU4m8RQCHtIduIJT%2Fimage.png?alt=media&amp;token=568a8ac8-2d05-4817-804e-6d125bda3214" alt=""><figcaption></figcaption></figure>

Basic Parameters:

* 'account' specify the sub-account name, replace it with your own sub-account;
* 'pool' specify the pool address<mark style="color:yellow;">:        qubic1.hk.apool.io:3334</mark>
* 'worker' specify the mining machine name, which use the machine ip default, and can be customized by the users, the naming rules are：can be up to 15 characters or less, and can contain alphanumeric characters (letters A-Z, numbers 0-9) and symbols.

CPU Performance Parameters:

* -t, –thread; specify the number of CPU thread \[default: 0, use all threads]

*Huge Pages*(on Linux), also known as *Large Pages* (on Windows) is another important thing for CPU mining, typical hashrate increase is 8% when huge pages used,  if you didn't set huge pages, you will see lines with text like bellow in miner log. &#x20;

<figure><img src="https://173695165-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FhcaIJhxZbNgQ58zWSXWs%2Fuploads%2FuJ781h0QYObBeaAhMhIM%2Fimage.png?alt=media&amp;token=9f537853-9536-480b-a0fa-09b6c6bae128" alt=""><figcaption></figcaption></figure>

&#x20;**4. Execute the command to start mining**

* Mining with CPU only

```
./run_qubic_cpu.sh
```

* Mining with GPU only

```
./run_qubic_gpu.sh
```

* Mining with GPU and CPU&#x20;

```
./run_qubic_all.sh
```

**5. Execute the command to check the mining process**

```
tail -f qubic.log
```

&#x20;**6. Watch the Statistics and earn QU's on Apool**

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