Shell 与提示符
此页面需较新浏览器(支持 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,打印当前目录)来看看你在哪个文件夹,然后点击运行。
难度 1/5 · 今日首次完成可获 100 金币及少量额外奖励
echo 会把你给它的内容原样打印出来。用它打印出 hello 这个词。
难度 1/5 · 今日首次完成可获 100 金币及少量额外奖励
Shell 会将未加引号的行拆分为单词,因此 echo 接收 my 和 gap,并用一个空格将它们连接。若要将其作为单个词保留,请添加双引号:使用 echo "my gap" 打印带有三个空格的文本 my gap。