BM: Baca dalam Bahasa Melayu
World 0: Start Here
Terminal basics
You will learn: four commands to find your way around the terminal.
The problem
Git lives in the terminal: A window where you type commands to your computer.. No mouse, no icons. Just words. How do you find your way around?
Watch
pwd asks: where am I? The answer is a path, like an address for folders. Here, you are home: /home/you.
Watch
ls asks: what’s in here? Blue names are folder (directory): A place that holds files and other folders.. The others are files.
Watch
cd means change directory. Directory is another word for folder. cd Documents walks into Documents. cd .. walks back out.
Try it
Go into Documents. Then list what’s inside.
Hint
Firstcd Documents. Then ls.Watch
mkdir means make directory. mkdir projects makes a new, empty folder called projects.
Try it
Make a folder called projects. Then go into it.
Hint
Firstmkdir projects. Then cd projects.Predict
You are in /home/you. You type cd Music. What will pwd show?
Pick one answer.
You did it!
You can now find your way around with pwd, ls, cd and mkdir.
Go deeper (optional)
ls -a also shows hidden files. Their names start with a dot. cd ~ (or just cd) takes you home. mkdir -p makes folders inside folders in one go.
Bahasa Melayu
Git tinggal dalam terminal (tetingkap untuk taip arahan). Tiada tetikus, tiada ikon. Hanya perkataan. Macam mana nak bergerak di sini?
pwd tanya: saya di mana? Jawapannya ialah path (laluan), macam alamat untuk folder. Sekarang anda di rumah: /home/you.
ls tanya: ada apa di sini? Nama biru ialah folder. Yang lain ialah fail.
cd maksudnya tukar directory (direktori). Direktori ialah nama lain untuk folder. cd Documents masuk ke Documents. cd .. keluar semula.
Masuk ke Documents. Lepas tu senaraikan isinya.
cd Documents. Lepas tu ls.mkdir maksudnya make directory (buat direktori). mkdir projects buat satu folder baru yang kosong, namanya projects.
Buat folder bernama projects. Lepas tu masuk ke dalamnya.
mkdir projects. Lepas tu cd projects.Anda di /home/you. Anda taip cd Music. Apa yang pwd akan tunjuk?
Kini anda boleh bergerak dalam terminal guna pwd, ls, cd dan mkdir.
You finished this before. Practice is always welcome!
You've learned for 25 minutes. A short break helps your brain.
Sprint done! Great focus. Stretch for a minute?