# ติดตั้ง 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: 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.aic-eec.com/c-c++-for-embedded-programming/development-environment-preparation/ubuntu-environment.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.
