> For the complete documentation index, see [llms.txt](https://ruggedboard.gitbook.io/ruggedboard/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://ruggedboard.gitbook.io/ruggedboard/tutorial-using-c/hello-world/transferring-files-from-host-to-board.md).

# Transferring Files from Host to Board

{% tabs %}
{% tab title="Linux Host" %}
**To setup TFTP server on HOST PC**

**Step 1: Open a Terminal window on your PC and navigate to the scripts folder. This folder contains 3 files:** `elinux_pkg.sh`**,** `if_machine_is_64-bit.sh`**,** `tftp-script.sh`**.**

**Step 2: If you are running 64 bit machine, run** `if_machine_is_64-bit.sh`**.**\
**NOTE: You can ignore this step or else.**

**Step 3: Run the** `elinux_pkg.sh`**,** `tftp-script.sh`**.**

**Step 4: Check if tftpboot folder has been created in /var/lib/ directory, The box highlighted in green shows that tftpboot folder has been created in /var/lib/ directory.**

![TFTP](https://3507971843-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LbvnQRGvCTc2Zmsi6BG%2F-LeRWbcbSmhr73fYi1s0%2F-LeRWolgHV4GruFpZD43%2Ftftpboot.png?alt=media\&token=d2428b46-4703-487d-9d3b-11e0ff317616)

**Step 5: Connect an ethernet cable to the board and type** `ifconfig` **on your PC and note down your server address. Highlighted white text shows server address in my case.**

![To check the server address.](https://3507971843-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LbvnQRGvCTc2Zmsi6BG%2F-LeRWbcbSmhr73fYi1s0%2F-LeRX_EE8SN-OoF7ocfR%2Fifconfig.png?alt=media\&token=fd09f59f-d3bd-455b-add2-ce4e3fba861f)

**Step 6: Create and copy a test file(Ex: test.txt) to tftpboot folder. Create a file named test.txt**`touch test.txt`**copy it to /var/lib/tftpboot** `cp test.txt /var/lib/tftpboot`.

**Step 7: Switch to your board's terminal and type in** `tftp -r test.txt -g 192.168.1.12`.

**Step 8: Now you should be able to see the file on your board.**

![test.txt file transferred to the board](https://3507971843-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LbvnQRGvCTc2Zmsi6BG%2F-LeRWbcbSmhr73fYi1s0%2F-LeR_F-uVMmtunf8J3Xd%2Fboard_receive.png?alt=media\&token=95200c1c-3d7f-49b6-86cd-547a69f97b97)
{% endtab %}

{% tab title="Windows Host" %}

{% endtab %}
{% endtabs %}
