> For the complete documentation index, see [llms.txt](https://docs.aic-eec.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.aic-eec.com/c-c++-for-embedded-programming/development-environment-preparation/ubuntu-environment.md).

# ติดตั้ง Ubuntu environment

### สำหรับการติดตั้งบน Ubuntu 18.04 และ WSL2:Ubuntu 18.04

เปิด Ubuntu/ Ubuntu distribute แล้วเปิด terminal เข้า Super userให้ใช้คำสั่งนี้

```
sudo su
```

ใช้คำสั่ง อัพเดท Ubuntu ดังนี้ &#x20;

```
apt-get update && apt-get upgrade -y
```

ทำการติดตั้ง build essential ลงบน Ubuntu ด้วยคำสั่ง

```
apt-get install build-essential -y
```

เมื่อติดตั้งสำเร็จให้ใช้คำสั่งต่อไปนี้

```
apt-get install autoconf automake gdb git libffi-dev zlib1g-dev libssl-dev -y
```

เมื่อติดตั้งเสร็จ ให้ใช้คำสั่ง ออกจาก Super user ดังนี้

```
exit
```

หลังจากติดตั้งเสร็จสิ้นตอนนี้เครื่องของเราก็สามารถพร้อมใช้งาน Ubuntu เพื่อเขียนโปรแกรมแล้ว

### สำหรับการติดตั้งบน CentOS

ให้ทำการติดตั้ง โดยใช้ command บน terminal ของ Ubuntu โดยใช้คำสั่งดังต่อไปนี้&#x20;

```
sudo su 
apt-get update -y
apt-get install -y yum
yum groupinstall "Development Tools"
```

เมื่อติดตั้งสำเร็จเราจะสามารถใช้คำสั่งและคอมไพล์เลอร์ด้านล่างได้

> * autoconf
> * automake
> * gcc / g++
> * gdb
> * git
> * patch

หลังจากติดตั้งด้านบนสำเร็จให้รันคำสั่ง

```
yum install libffi-devel
```

เมื่อติดตั้งสำเร็จ CentOS จะพร้อมใช้งานแล้ว


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## 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, and the optional `goal` query parameter:

```
GET https://docs.aic-eec.com/c-c++-for-embedded-programming/development-environment-preparation/ubuntu-environment.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
