สรุป Audition 2 [Day 2–3] — The Cloud Camp 2024

Watcharapong Suckavanich
T. T. Software Solution
6 min readJun 8, 2024

ต่อเนื่องจากครั้งก่อน https://medium.com/t-t-software-solution/%E0%B8%AA%E0%B8%A3%E0%B8%B8%E0%B8%9B%E0%B8%81%E0%B8%B2%E0%B8%A3%E0%B8%9A%E0%B9%89%E0%B8%B2%E0%B8%99-audition-2-day-1-3-the-cloud-camp-2024-ed17d01377de?source=your_stories_page-------------------------------------

วันที่ 2

Linux Fundamental

Introduction to Shell

Basic Command and Arguments

pwd = print work directory
cd = change directory
. = current directory
.. = backward directory
~ = home directory
/ = root directory
man = manual page
touch = create file/edit file
rm = remove file

แต่เรามักใช้ rm -rf เพราะถ้ามี file อยู่ภายใต้ directory command rm จะไม่ยอมลบ หรือถ้าติดสิทธิ์ก็ลบไม่ได้อีก

💡 r = recursive, f = force

mv = ใช้เปลี่ยนชื่อไฟล์ได้ด้วย เพราะไม่มีคำสั่ง rename

cat = catenate (อ่านไฟล์ หรือเปิดไฟล์ แล้วแสดงออกมาทางหน้าจอ)
less = เปิดไฟล์แบบเป็นหน้ากระดาษ (เปิดจากหน้าท้าย)
head = เอาบรรทัดบนสุดมาแสดง
tail = เอาบรรทัดล่างสุดมาแสดง

grep = search ที่ดีกว่า find

grep (global regular expression print)

มักนิยมใช้

grep -ie

pipe จะเอาผลลัพธ์ไปใช้ต่อ

echo เป็นคำสั่งที่มาพร้อมกับ shell

which หรือ type เป็นคำสั่งดูว่า command มาจากไหน

Text Shell Types

&& คือการ run คำสั่งแรกเสร็จ แล้วค่อยไป run คำสั่งที่สอง

Linux Core Concept

Linux Kernel

kernel เป็นตัวกลางที่สื่อสารระดับ Low level

major = เวอร์ชันหลัก

minor = เวอร์ชั่น feature

patch = ถ้ามีบัค แก้บัค

distro = รุ่น

Working with Hardware

sudo = super user do
su = switch user

Boot Sequence

File Types

💡 alias = shortcut

📌 Soft Links ข้อมูลยังอยู่ที่ต้นทาง ลบหายแต่ shortcut Hard Links ข้อมูลเชื่อมต่อทั้งสองที่ ลบหายหมด

Package Manager

RPM

RPM ติดตั้งบน local ถ้าบน Mac คือ DMG

YUM ต่อตรงไปที่ Repository แล้วต่อตรงไปโหลดไฟล์มาติดตั้ง

แต่ปัจจุบันใช้ dnf

Debian

APT-GET เป็นรุ่นแรกๆ ตัวเก่า

ปัจจุบันใช้ APT ตัวเดียว

vi Editor

i = insert

ออกจาก insert mode กด ESC

shift + a = ,ove curser ไปอยุ๋ท้ายสุด แล้วเข้า insert mode

gg = กระโดดขึ้นไปบนบรรทัดแรก

shift + g = ลงไปล่างสุดของไฟล์

Basic Observability

Application Characteristic

Program Process

Program คือการทำตามคำสั่งโดยไม่เถียง

API run ตลอดเวลา

Application Building

ภาษาที่แปลงออกมาเป็น executable file เลย จะเป็น system programming language

ภาษาที่แปลงออกมาเป็น application package แล้วต้องลงตัว runtime ก่อน

Application Output

Application Package Manager

เป็นคำสั่งสำหรับติดตั้ง package ขึ้นอยู่กับภาษาที่ใช้งาน

Telemetry Signals

Container Fundamental

Container Story

Container Origin

Container Technology

เมื่อเก็บ Container Image ไว้ ก็สามารถจะ clone ออกไปใช้งานซ้ำๆ ได้เรื่อยๆ

Container Runtime

--

--