# Linux Tutorial

## Minimum Requirements for Linux Mining

As a recommendation, Users should ensure their hardware meets the requirements:

**GPU Cloud Server:** The server must allow access to Docker's official website and possess a static IP located in Europe or North America.  Users must ensure their hardware meets the following basic requirements &#x20;

* **Operating System:** <mark style="color:blue;">Ubuntu 20 and above</mark>
* **Processor** : <mark style="color:blue;">At least 2 cores</mark>
* **Memory** : <mark style="color:blue;">Minimum 4GB, 12GB recommended</mark>
* **Graphics card:** <mark style="color:blue;">Minimum NVIDIA GeForce GTX 1070 8GB, recommended NVIDIA GeForce GTX 3060 12GB</mark>
* **Graphics drivers:** OpenCL, [AMD drivers (AMD GPU ](https://www.amd.com/en/resources/support-articles/knowledge-base-search.html)) and [AMD driver signatures ](https://sourceforge.net/projects/amd-ati-pixel-clock-patcher/), HIP or [C UDA drivers](https://developer.nvidia.com/cuda-downloads)

## Linux Installation and Configuration

To ensure a stable network and proper GPU support, it's recommended to rent a GPU cloud server with a static IP in the US or Europe.Below is a step-by-step guide using Tencent Cloud with a US IP as an example.

### 1. Configure GPU Cloud Server

Ensure your server meets the GPU and IP requirements, choose a Linux OS version, and save the server’s IP, account, and password.<br>

### 2. Ubuntu System Configuration

In this example, select Ubuntu 22.04 LTS during the GPU cloud server setup. The server automatically installs the system and the necessary components.<br>

#### 2.1 Ubuntu Device Status Verification

A. **View System Version**

```powershell
cat /proc/version
cat /etc/os-release
```

**Note:** Docker installation and commands vary by Ubuntu version. Check your Ubuntu version before installation.

<figure><img src="/files/IdQfs17NLjz2P8pMhPU1" alt=""><figcaption></figcaption></figure>

**B. View CPU and GPU Information**

**# CPU Information:**

```powershell
cat /proc/cpuinfo | grep "cpu cores" | uniq
cat /proc/cpuinfo | grep "model name" | uniq
```

**# GPU Information:**

```powershell
lspci | grep -i vga
lspci ｜ grep -i nvidia
```

<figure><img src="/files/a09Cn7ZONvjJwcQJB9ZV" alt=""><figcaption></figcaption></figure>

#### 2.2 Ubuntu Graphical Interface and Remote Control

Ubuntu on GPU cloud servers usually don’t have a graphical interface by default. You need to install the **xfce** desktop environment and **remote control via VNC**.

**A. Install xfce Desktop**

Open a terminal and run the following commands:

\#**Clear Cache and Update Packages**

```powershell
sudo apt clean all && sudo apt update
```

\#**Install xfce Desktop Packages (Skip if a Graphical Interface is Already Installed)**

```powershell
sudo apt install xfce4 xfce4-goodies
```

\#**Allow TCP Port 5901 for VNC**

```powershell
sudo ufw allow 5901/tcp
```

<br>

**B. Install and Configure VNC Service**

\#**Install VNC Service**

```powershell
sudo apt install tightvncserver
```

\#**Run VNC Service**

```powershell
vncserver
```

<figure><img src="/files/N85Mj7ISl5gYr6Zqxobl" alt=""><figcaption></figcaption></figure>

When you first run the vncserver command, enter your VNC password (at least 8 characters) when prompted. Press Enter and re-enter the password to confirm it. Optionally, set a read-only password for access.

**Enable VNC Copy and Paste**

**#Install the `autocutsel` Package**

```powershell
sudo apt-get install autocutsel
```

\
\&#xNAN;**#Modify `~/.vnc/xstartup` and add `autocutsel -fork`.**

```powershell
sudo vim ~/.vnc/xstartup
```

**#Modified Command Image**

<figure><img src="/files/6HaSkqCezKNHEzNjX7Uv" alt=""><figcaption></figcaption></figure>

\#**Restart VNC**

```PowerShell
vncserver -kill :1  
vncserver :1
```

<br>

**C. Install VNC Viewer**

**Install VNC Viewer on your local device**

Visit the [VNC website](https://www.realvnc.com/en/connect/download/viewer/) and download the appropriate version for your operating system. Install the application and then open VNC Viewer as shown in the image below:

<figure><img src="/files/SKZi6zLILLRf74qK7V3N" alt=""><figcaption></figcaption></figure>

Enter GPU cloud service <mark style="color:red;">public IP:1</mark> in the address bar. When prompted, enter your VNC password and click Confirm.

By default, VNC Viewer has low display quality.&#x20;

Run the following command on the cloud server to improve it:

```powershell
sudo vim /etc/tightvncserver.conf
```

Set the VNC resolution to **2560x2048** as shown in the figure above.

<figure><img src="/files/69N0ZzC2FTIx9Y5rzK6u" alt=""><figcaption></figcaption></figure>

Restart the VNC service on the cloud server. Reconnect with your local VNC Viewer to check if the resolution is clear.<br>

#### 2.3 Install Google Chrome on Ubuntu

Install Google Chrome on Ubuntu to access the EMC testnet for mining.

**Install Chrome Browser**

```powershell
# download google-chrome-stable.deb
wget https://dl.google.com/linux/direct/google-chrome-stable_current_amd64.deb

# install google-chrome-stable.deb
sudo apt install ./google-chrome-stable_current_amd64.deb

# run google-chrome-stable
google-chrome-stable
```

**Use Chrome in VNC Viewer**

Connect to the cloud server using VNC Viewer on your local computer. Open Chrome within the VNC session to confirm the browser is installed correctly.

<figure><img src="/files/ljlLe98SllHGBUMVB43S" alt=""><figcaption></figcaption></figure>

The image above shows that Chrome is installed successfully.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.emc.network/emc-testnet/emc-airdrop-guidelines/testnet-tutorial-guide/linux-tutorial.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
