The shell and the prompt · Shell และ prompt
This page needs a recent browser (with SharedArrayBuffer support). Please update Chrome, Edge, Firefox or Safari to the latest version. · หน้านี้ต้องใช้เบราว์เซอร์ล่าสุด (รองรับ SharedArrayBuffer) กรุณาอัปเดต Chrome, Edge, Firefox หรือ Safari เป็นเวอร์ชันล่าสุด
English
The prompt
- When the terminal is ready, it shows a prompt and waits:
- That tells you who you are (
student), the computer (linux), and the folder you are in (~, your home). - You type a command after the
$, press Enter, and the computer runs it.
ไทย
ปุ่มคำสั่ง (Prompt)
- เมื่อเทอมินอลพร้อม它就会แสดง prompt และรอ:
student@linux:~$
- มันบอกคุณว่า ใคร คือคุณ (
student), คอมพิวเตอร์ (linux), และ โฟลเดอร์ ที่คุณกำลังอยู่ในนั้น (~,也就是 home ของคุณ) - คุณพิมพ์คำสั่งต่อจาก
$แล้วกด Enter คอมพิวเตอร์จะดำเนินการตามนั้น
English
Where am I?
- The command
pwdprints your current folder — your "you are here" on the map:
- Press the ▶ on that example to try it. (
~is short for your home folder,/home/student.)
ไทย
ฉันอยู่ที่ไหน?
- คำสั่ง
pwdจะแสดง โฟลเดอร์ปัจจุบัน ของคุณ — หรือ "คุณอยู่ที่นี่" บนแผนที่:
pwd
- กด ▶ ในตัวอย่างเพื่อลองทำ (
~คือชื่อสั้นของโฟลเดอร์ home ของคุณ,/home/student)
English
Make the computer talk
echosimply prints back what you type. It is the classic first command:
- Run it, then try the two tasks below.
ไทย
ให้คอมพิวเตอร์พูดกับคุณ
- คำสั่ง
echoจะพิมพ์ข้อความที่คุณพิมพ์กลับออกมา นี่คือคำสั่งแรกคลาสสิก:
echo Hello from the shell
- รันคำสั่งนี้ แล้วลองทำภารกิจสองข้อด้านล่าง
English
Common mistakes
- Commands are case-sensitive:
LSis notls. - The shell runs one command per line when you press Enter.
ไทย
ข้อผิดพลาดที่พบบ่อย
- คำสั่งมีความไวต่อตัวพิมพ์ใหญ่-เล็ก:
LSไม่เหมือนls - Shell จะรันคำสั่งทีละบรรทัดเมื่อคุณกด Enter
The prompt is waiting for a command. Type pwd (print working directory) to see which folder you are in, then click Run. · Prompt กำลังรอคำสั่ง พิมพ์ pwd (print working directory) เพื่อดูว่าคุณอยู่ในโฟลเดอร์ไหน然后点击 Run.
echo prints back whatever you give it. Use it to print the word hello. · echo จะพิมพ์กลับทุกอย่างที่คุณป้อนให้ ใช้มันเพื่อพิมพ์คำว่า hello