> 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/computer-operation-systems/zero-to-linux-hero/anatomy-of-linux-kernel/setup-ubuntu-environment.md).

# Linux Environment for Developer

ติดตั้งเครื่องมือและไลบรารีที่เกี่ยวข้อง

```
sudo apt-get install git autoconf automake gdb fakeroot build-essential libtinfo6 libncurses6 libncursesw6 libncurses-dev xz-utils libssl-dev flex libffi-devel libelf-dev bisonsudo 
```

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

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

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

ตรวจสอบ kernel version ที่ใช้อยู่ เพื่อเลือก Linux Kernel Source ให้ใกล้เคียงที่สุด

```bash
uname -a                                                                                                      ─╯
Linux wiroon-ubuntu 5.19.0-46-generic #47~22.04.1-Ubuntu SMP PREEMPT_DYNAMIC Wed Jun 21 15:35:58 UTC 2 aarch64 aarch64 aarch64 GNU/Linux
```

ดาวโหลด Linux Kernel Source (ในที่นี้จะเลือกเวอร์ชัน `5.19.1`) เพื่อทำความเข้าใจโครงสร้างภายใน Linux OS

```sh
sudo wget https://cdn.kernel.org/pub/linux/kernel/v5.x/linux-5.19.1.tar.gz
tar -xzvf linux-5.19.1.tar.gz
cd linux-5.19.1
```

```sh
cp /boot/config-$(uname -r) .config
make menuconfig
```

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

Output จาก `asciinema` จากการรันคำสั่ง `make menuconfig` --> [Link](https://github.com/Advance-Innovation-Centre-AIC/Linux_Operating_System_Class/blob/master/terminal_recorded/menuconfig.gif)


---

# 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/computer-operation-systems/zero-to-linux-hero/anatomy-of-linux-kernel/setup-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.
