Thuta Learning
ရှာဖွေရန်
BasicHardwarebeginner

Basic Linux Commands on Raspberry Pi

စိတ်လျှော့ပါ။ ဒီခန်းကို စာအုပ်လိုမဟုတ်ဘဲ စကားပြောသလိုပဲ၊ နားလည်လွယ်အောင် ရှင်းပါမယ်။

ဒီခန်းပြီးရင် ဘာတတ်သွားမလဲ

  • Basic Linux Commands on Raspberry Pi ကို ကြောက်စရာမလိုအောင် နားလည်မယ်
  • ကိုယ်တိုင် hardware wiring/code ကို run ကြည့်တတ်မယ်
  • Real project ထဲမှာ ဒီ concept ကို ချက်ချင်း အသုံးချတတ်မယ်

ခဏလေး ဒီလိုပဲ စဉ်းစားကြည့်

Raspberry Pi OS က Debian-based Linux distro ဖြစ်တာကြောင့် Linux tutorial တစ်ခုလုံးက command, concept (filesystem hierarchy, permission, package management) တွေ အားလုံးက Raspberry Pi ပေါ်မှာ တိုက်ရိုက် အသုံးဝင်ပါတယ် — Raspberry Pi ကို 'Linux ကို practice လုပ်ဖို့ physical device တစ်ခု' လို့ ခံစားရနိုင်ပါတယ်။ Terminal application ကို desktop mode ရဲ့ taskbar ကနေ ဖွင့်လို့ရပြီး, headless mode ဆိုရင် SSH ကနေ ချက်ချင်း terminal ရောက်ပါတယ်။

လက်တွေ့ scenario နဲ့ ချိတ်ကြည့်မယ်

Raspberry Pi ရဲ့ home folder (/home/pi ဒါမှမဟုတ် setup ချိန်က ရွေးထားတဲ့ username) ထဲမှာ project folder တွေ ဖန်တီး, file တွေ manage လုပ်ရာမှာ Linux tutorial ရဲ့ 'Files & Filesystem' chapter (pwd, ls, cd, mkdir, cp, mv) ကို တိုက်ရိုက် reuse လုပ်နိုင်ပါတယ် — vfat ဖြင့် formatted USB drive ကို plug in လုပ်ရင် /media ထဲ auto-mount ဖြစ်တာလည်း Linux tutorial ရဲ့ filesystem hierarchy concept အတိုင်းပါပဲ။

အတူတူ ကြည့်မယ်

bash
pwd
ls -la
mkdir my-first-project
cd my-first-project
touch notes.txt
cat /etc/os-release   # Raspberry Pi OS version စစ်
You should see
cat /etc/os-release ကို run ရင် 'Raspberry Pi OS' (Debian-based) ဆိုတဲ့ information ကို terminal ပေါ်တွင် တွေ့ရမည်။

၅ မိနစ် စမ်းကြည့်

Raspberry Pi (ရှိရင်) ဒါမှမဟုတ် ကိုယ့် Linux tutorial VM/WSL ပေါ်မှာ project folder အသစ်တစ်ခု ဖန်တီးပြီး cat /etc/os-release ကို run ကြည့်ပြီး OS information ကို ဖတ်ကြည့်ပါ။

သတိလေးတစ်ချက်

Raspberry Pi ရဲ့ SD card storage က limited ဖြစ်တာမို့ (laptop hard drive ထက် သေးငယ်) disk space ကို Linux tutorial ရဲ့ 'Disk & Storage' lesson (df -h, du -sh) ဖြင့် ပုံမှန်စစ်ဆေးထားသင့်ပါတယ်။

ဒီနေရာမှာ လူအများမှားတတ်တယ်

  • Raspberry Pi OS ကို 'Linux ဆိုတဲ့ concept တစ်ခုလုံး လိုက်ဖတ်ဖို့မလို, Pi-specific command တွေ ပဲ ရှိတယ်' လို့ ထင်ခြင်း — Linux tutorial အားလုံးက directly applicable ပါ
  • sudo ကို Linux tutorial ကနေ ပြန်ကျင့်ရမှန်း မေ့ပြီး admin task (apt install) ကို sudo မပါဘဲ run ကြိုးစားခြင်း

အခု ကိုယ်တိုင် စမ်းကြည့်

Raspberry Pi (ရှိရင်) ဒါမှမဟုတ် ကိုယ့် Linux tutorial VM/WSL ပေါ်မှာ project folder အသစ်တစ်ခု ဖန်တီးပြီး cat /etc/os-release ကို run ကြည့်ပြီး OS information ကို ဖတ်ကြည့်ပါ။

You'll know it worked when: cat /etc/os-release ကို run ရင် 'Raspberry Pi OS' (Debian-based) ဆိုတဲ့ information ကို terminal ပေါ်တွင် တွေ့ရမည်။