การนำทางเบื้องต้น: `cd`, `ls`, `pwd`
เรียนรู้การเคลื่อนที่ภายในระบบไฟล์ แสดงรายการเนื้อหาในไดเรกทอรี และระบุตำแหน่งปัจจุบันของคุณ
การนำทางเบื้องต้น: `cd`, `ls`, `pwd` เป็นบทเรียน Linux Command Line Mastery ฟรีบน CoddyKit นี่คือบทเรียนที่ 2 จากทั้งหมด 4 บทเรียน คุณสามารถอ่านบทเรียนทั้งหมดด้านล่างฟรี — จากนั้นลองปฏิบัติด้วยตัวคุณเองในเบราว์เซอร์พร้อมตัวแก้ไขโค้ดในตัวและติวเตอร์ AI ตลอด 24/7 บทเรียนนี้เป็นส่วนหนึ่งของเส้นทางการเรียน Linux Command Line Mastery และความก้าวหน้าของคุณจะซิงค์ข้ามเว็บและแอป CoddyKit คอร์ส Linux Command Line Mastery มีบทเรียนทั้งหมด 4 บทเรียน
บางส่วนของบทเรียนนี้ยังไม่ได้รับการแปล และแสดงเป็นภาษาอังกฤษ
Navigating Your Linux System
The Linux file system is a tree rooted at /. This lesson covers the commands to move around it and see what’s inside each directory.
Where Am I? The `pwd` Command
Lost your place? pwd (print working directory) shows the full path of where you are right now — your “you are here” sign.
See Your Current Path with `pwd`
Run pwd to see your current directory — likely something like /home/user.
pwdWhat's Here? The `ls` Command
ls (list) shows the files and folders in your current directory — or any directory you point it at.
Listing Directory Contents with `ls`
Let’s make a folder and a file, then run ls to watch them show up.
mkdir my_documents
touch notes.txt
lsMoving Around: The `cd` Command
cd (change directory) moves you around the file system. Give it an absolute path (from /) or a relative one (from where you are).
Changing with Absolute Paths
An absolute path starts at the root /, so it always points to the same place no matter where you currently are.
mkdir -p /tmp/my_project/src
cd /tmp/my_project/src
pwdChanging with Relative Paths
A relative path starts from your current spot — shorter and handy. Use . for here and .. for the parent directory.
mkdir -p project/images
cd project
pwd
cd images
pwd
cd ..
pwdUseful `ls` Options: `-l` and `-a`
Two essential ls flags: -l for a long listing (permissions, size, date) and -a to reveal hidden dotfiles.
touch .config_file
touch public_file
ls -a
ls -lTest Your Navigation Skills
Consider the following sequence of commands executed in a terminal:
mkdir my_app
cd my_app
mkdir assets
touch assets/image.png
cd ..
lsRecap: Navigate Like a Pro!
Navigation locked in! pwd shows where you are, ls lists contents, and cd moves you around with absolute or relative paths.
คำถามที่พบบ่อย
บทเรียน “การนำทางเบื้องต้น: `cd`, `ls`, `pwd`” ฟรีหรือไม่
ใช่ — ข้อความเต็มของ “การนำทางเบื้องต้น: `cd`, `ls`, `pwd`” ฟรีให้อ่านที่นี่บนเว็บ เพื่อปฏิบัติแบบโต้ตอบ (ตัวแก้ไขโค้ดในตัวและติวเตอร์ AI ตลอด 24/7) และปลดล็อคส่วนที่เหลือของคอร์ส Linux Command Line Mastery ให้อัปเกรดเป็น CoddyKit PRO คอร์ส Linux Command Line Mastery มีบทเรียนทั้งหมด 4 บทเรียน
คุณจะเรียนรู้อะไรในบทเรียน “การนำทางเบื้องต้น: `cd`, `ls`, `pwd`”
เรียนรู้การเคลื่อนที่ภายในระบบไฟล์ แสดงรายการเนื้อหาในไดเรกทอรี และระบุตำแหน่งปัจจุบันของคุณ คุณปฏิบัติ Linux Command Line Mastery ด้วยโค้ดที่ใช้งานได้จริงที่คุณเรียกใช้โดยตรงในเบราว์เซอร์ และติวเตอร์ AI ตลอด 24/7 ตอบคำถามของคุณขณะที่คุณไปผ่านบทเรียน
คุณต้องมีประสบการณ์ก่อนที่จะเริ่มเรียน Linux Command Line Mastery หรือไม่
ไม่จำเป็นต้องมีประสบการณ์มาก่อน Linux Command Line Mastery บน CoddyKit ออกแบบมาสำหรับผู้เริ่มต้นไปจนถึงผู้เรียนขั้นสูง คุณสามารถเริ่มต้นที่นี่หรือเริ่มจากตัวแรกและเรียนด้วยความเร็วของคุณเอง นี่คือบทเรียนที่ 2 จากทั้งหมด 4 บทเรียน
บทเรียน “การนำทางเบื้องต้น: `cd`, `ls`, `pwd`” ใช้เวลานานแค่ไหน
บทเรียน CoddyKit ส่วนใหญ่ใช้เวลาประมาณ 5–10 นาที แต่ละบทเรียนจึงสั้นและเป็นแบบโต้ตอบ คุณสามารถก้าวหน้าอย่างต่อเนื่องและกลับมาเรียนต่อจากตรงที่เพิ่งหยุดบนเว็บและแอปได้เลย
ฉันเขียนและรันโค้ดในบทเรียน Linux Command Line Mastery นี้ได้ไหม
ได้ บทเรียน Linux Command Line Mastery ทุกบทมีตัวแก้ไขโค้ดในตัว คุณจึงเขียนและรันโค้ดจริงได้เลยในเบราว์เซอร์ และได้รับข้อเสนอแนะจาก AI ในทันที — ไม่ต้องติดตั้งในเครื่องของคุณ
บทเรียนทั้งหมดในหลักสูตรนี้
- บทนำสู่เชลล์ Linux
- การนำทางเบื้องต้น: `cd`, `ls`, `pwd`
- การจัดการไฟล์และไดเรกทอรี: `mkdir`, `rm`, `cp`, `mv`
- การขอความช่วยเหลือ: man, --help และ tldr