> For the complete documentation index, see [llms.txt](https://dev.tesa.or.th/tesa-developer/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://dev.tesa.or.th/tesa-developer/tesa-technical-contents/linux-os/zero-to-linux-hero/anatomy-of-linux-system/linux-environment-for-developer.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
```

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