> 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 จะพร้อมใช้งานแล้ว
