Shell และ prompt
หน้านี้ต้องใช้เบราว์เซอร์ล่าสุด (รองรับ SharedArrayBuffer) กรุณาอัปเดต Chrome, Edge, Firefox หรือ Safari เป็นเวอร์ชันล่าสุด
English
The prompt
- When the terminal is ready, it shows a prompt and waits:
student@linux:~$
- 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.

English
Where am I?
- The command
pwdprints your current folder — your "you are here" on the map:
pwd
- Press the ▶ on that example to try it. (
~is short for your home folder,/home/student.)
English
Make the computer talk
echosimply prints back what you type. It is the classic first command:
echo Hello from the shell
- Run it, then try the two tasks below.
English
Common mistakes
- Commands are case-sensitive:
LSis notls. - Press Enter to submit a command; you can also put multiple commands on one line, separated by
;.
ความยาก 1/5 · 100 เหรียญ + บอนัสน้อยๆ เมื่อทำสำเร็จครั้งแรกในวันนี้
ระบบกำลังรอคำสั่ง กรุณาพิมพ์ pwd (print working directory) เพื่อดูว่าคุณอยู่ในโฟลเดอร์ใด จากนั้นคลิก Run.
ความยาก 1/5 · 100 เหรียญ + บอนัสน้อยๆ เมื่อทำสำเร็จครั้งแรกในวันนี้
echo จะพิมพ์กลับทุกอย่างที่คุณป้อนให้ ใช้มันเพื่อพิมพ์คำว่า hello
ความยาก 1/5 · 100 เหรียญ + บอนัสน้อยๆ เมื่อทำสำเร็จครั้งแรกในวันนี้
Shell จะแยกบรรทัดที่ไม่มีเครื่องหมายคำพูดออกเป็นคำ ดังนั้น echo จึงรับ my และ gap แล้วรวมกันด้วยช่องว่างหนึ่งช่อง หากต้องการให้ข้อความเป็นคำเดียว ให้ใส่ในเครื่องหมายคำพูดคู่: print my gap พร้อมช่องว่างสามช่อง โดยใช้ echo "my gap".