0Pricing
Mojo Academy · บทเรียน

การติดตั้ง Modular CLI

ติดตั้งชุดเครื่องมือบน macOS หรือ Linux

การติดตั้ง Modular CLI เป็นบทเรียน Mojo Academy ฟรีบน CoddyKit นี่คือบทเรียนที่ 1 จากทั้งหมด 4 บทเรียน คุณสามารถอ่านบทเรียนทั้งหมดด้านล่างฟรี — จากนั้นลองปฏิบัติด้วยตัวคุณเองในเบราว์เซอร์พร้อมตัวแก้ไขโค้ดในตัวและติวเตอร์ AI ตลอด 24/7 บทเรียนนี้เป็นส่วนหนึ่งของเส้นทางการเรียน Mojo Academy และความก้าวหน้าของคุณจะซิงค์ข้ามเว็บและแอป CoddyKit คอร์ส Mojo Academy มีบทเรียนทั้งหมด 4 บทเรียน

บางส่วนของบทเรียนนี้ยังไม่ได้รับการแปล และแสดงเป็นภาษาอังกฤษ

Why a Toolchain First

Before you write Mojo, your machine needs the compiler and tools. That bundle is the Modular toolchain, and getting it set up is step one. 🛠️

Meet the Modular CLI

The magic command-line tool from Modular installs and manages everything Mojo needs. Think of it as your toolchain manager.

Pick a Supported System

Mojo runs on macOS and Linux today. On Windows you use WSL, which gives you a Linux environment inside Windows.

Open Your Terminal

Everything here happens in the terminal. On macOS open Terminal, on Linux open your shell, and keep it ready for the next commands.

Run the Install Script

Install the CLI with the official script. This single curl command downloads and sets up the magic tool for you.

curl -ssL https://magic.modular.com/ | bash

What the Script Does

The script places the magic binary in a local folder and prints a line to add it to your PATH so the shell can find it.

Update Your PATH

Copy the export line the installer shows into your shell config so PATH includes magic in every new terminal you open.

export PATH="$HOME/.modular/bin:$PATH"

Reload the Shell

Apply the change by reloading your config or opening a fresh terminal. This is what makes the new magic command available.

source ~/.bashrc

Confirm the CLI Works

Check that the install succeeded by asking magic for its version. A version number means the CLI is ready to use.

magic --version

If the Command Is Not Found

A not-found error almost always means PATH is missing the magic folder. Re-check the export line and reload your terminal.

It Is Safe and Reversible

Everything installs into a local .modular folder in your home directory. To undo it later, you simply delete that folder.

Quick Check

Recall which tool you install first to manage Mojo on your machine.

Recap

You installed Modular's magic CLI with one curl command, fixed your PATH, and confirmed it with magic --version. Toolchain manager ready! 🎯

คำถามที่พบบ่อย

บทเรียน “การติดตั้ง Modular CLI” ฟรีหรือไม่

ใช่ — ข้อความเต็มของ “การติดตั้ง Modular CLI” ฟรีให้อ่านที่นี่บนเว็บ เพื่อปฏิบัติแบบโต้ตอบ (ตัวแก้ไขโค้ดในตัวและติวเตอร์ AI ตลอด 24/7) และปลดล็อคส่วนที่เหลือของคอร์ส Mojo Academy ให้อัปเกรดเป็น CoddyKit PRO คอร์ส Mojo Academy มีบทเรียนทั้งหมด 4 บทเรียน

คุณจะเรียนรู้อะไรในบทเรียน “การติดตั้ง Modular CLI”

ติดตั้งชุดเครื่องมือบน macOS หรือ Linux คุณปฏิบัติ Mojo Academy ด้วยโค้ดที่ใช้งานได้จริงที่คุณเรียกใช้โดยตรงในเบราว์เซอร์ และติวเตอร์ AI ตลอด 24/7 ตอบคำถามของคุณขณะที่คุณไปผ่านบทเรียน

คุณต้องมีประสบการณ์ก่อนที่จะเริ่มเรียน Mojo Academy หรือไม่

ไม่จำเป็นต้องมีประสบการณ์มาก่อน Mojo Academy บน CoddyKit ออกแบบมาสำหรับผู้เริ่มต้นไปจนถึงผู้เรียนขั้นสูง คุณสามารถเริ่มต้นที่นี่หรือเริ่มจากตัวแรกและเรียนด้วยความเร็วของคุณเอง นี่คือบทเรียนที่ 1 จากทั้งหมด 4 บทเรียน

บทเรียน “การติดตั้ง Modular CLI” ใช้เวลานานแค่ไหน

บทเรียน CoddyKit ส่วนใหญ่ใช้เวลาประมาณ 5–10 นาที แต่ละบทเรียนจึงสั้นและเป็นแบบโต้ตอบ คุณสามารถก้าวหน้าอย่างต่อเนื่องและกลับมาเรียนต่อจากตรงที่เพิ่งหยุดบนเว็บและแอปได้เลย

ฉันเขียนและรันโค้ดในบทเรียน Mojo Academy นี้ได้ไหม

ได้ บทเรียน Mojo Academy ทุกบทมีตัวแก้ไขโค้ดในตัว คุณจึงเขียนและรันโค้ดจริงได้เลยในเบราว์เซอร์ และได้รับข้อเสนอแนะจาก AI ในทันที — ไม่ต้องติดตั้งในเครื่องของคุณ

บทเรียนทั้งหมดในหลักสูตรนี้

  1. การติดตั้ง Modular CLI
  2. การเพิ่มแพ็กเกจ Mojo
  3. การตรวจสอบเวอร์ชัน
  4. การตั้งค่าเครื่องมือแก้ไขสำหรับ Mojo
← กลับไปที่ Mojo Academy