Shell và dấu nhắc
Trang này cần trình duyệt gần đây (hỗ trợ SharedArrayBuffer). Vui lòng cập nhật Chrome, Edge, Firefox hoặc Safari lên phiên bản mới nhất.
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
;.
Độ khó 1/5 · 100 xu + phần thưởng nhỏ khi hoàn thành lần đầu tiên hôm nay
Dấu nhắc đang chờ một lệnh. Gõ pwd (print working directory) để xem bạn đang ở thư mục nào, sau đó nhấn Run.
Độ khó 1/5 · 100 xu + phần thưởng nhỏ khi hoàn thành lần đầu tiên hôm nay
echo in lại bất cứ cái gì bạn đưa vào. Dùng nó để in từ hello.
Độ khó 1/5 · 100 xu + phần thưởng nhỏ khi hoàn thành lần đầu tiên hôm nay
Shell tách một dòng không có dấu ngoặc kép thành các từ, nên echo nhận được my và gap và nối chúng bằng một khoảng trắng. Đặt văn bản trong dấu ngoặc kép kép để giữ nó là một từ: in my gap với ba khoảng trắng, sử dụng echo "my gap".