Open the Terminal and Learn Your First Commands

한국어 버전

1. Why do we need the terminal?

If you are used to graphical apps, the terminal can feel strange. But most AI coding tools run from the terminal. You need it when you run opencode, execute Python code, create folders, or check whether something is installed.

The goal of this post is simple.

  • Open the terminal.
  • Check where you are.
  • See what is inside the current folder.
  • Move to another folder.
  • Create a new folder.

If you know only these four things, you can create the myproject01 folder in the next post.

2. New terms in this post

  1. Terminal: a window where you type commands
  2. CLI: a program controlled with text commands
  3. Command: a short instruction you type to tell the computer what to do
  4. Path: an address that shows where a folder or file is located

3. Open the terminal

Windows

Windows includes Command Prompt (cmd) and Windows PowerShell by default. For this series, PowerShell 7 (pwsh) is the recommended choice. Older Windows PowerShell 5.1 can sometimes break Korean text or colors, so installing the newer version is easier in the long run.

Choose one of these installation methods.

  1. Search for PowerShell in the Microsoft Store and install it. This is the easiest method.
  2. Type winget install Microsoft.PowerShell in a terminal. This installs it with one command.
  3. Download the latest installer from the official PowerShell release page.

After installation, you will see a new app named PowerShell 7 or pwsh in the Start menu. When this series says "open the terminal" on Windows, open PowerShell 7.

This series does not cover deeper environments such as WSL. PowerShell 7 is enough for the beginning.

After installation, press Win + R, type pwsh, and press Enter. PowerShell 7 will open. If that does not work yet, type wt to open Windows Terminal.

macOS

On macOS, you can use the built-in Terminal app.

Press Cmd + Space, type Terminal, and press Enter. Spotlight will open Terminal.

4. First command pwd: where am I?

When the terminal opens, you will see a blinking cursor. That means it is ready for input.

The first command tells you your current location.

pwd means "print working directory." In simple words, it asks, "Which folder am I standing in right now?" It works on both Windows PowerShell 7 and macOS.

pwd: check current location zsh · ~
Ready. Press Replay to run the scripted session.

On Windows, it may look like this.

pwd: check current location (Windows) zsh · C:\\Users\\TeacherKim
Ready. Press Replay to run the scripted session.

That result is a path. It shows which folder the terminal is currently in.

5. Second command ls: what is here?

To see what is inside the current folder, type this command.

ls means "list." It shows the files and folders inside the current folder. If you use PowerShell 7, ls works on Windows too.

ls: list folder contents zsh · ~
Ready. Press Replay to run the scripted session.

6. Third command cd: move to another folder

Use cd when you want to move to another folder. cd means "change directory."

For example, to move into the Documents folder, type cd Documents.

cd: move folders zsh · ~
Ready. Press Replay to run the scripted session.

To go back one level, type cd ... The two dots mean "the folder one level above."

cd ..: move one level up zsh · ~/Documents
Ready. Press Replay to run the scripted session.

7. Fourth command mkdir: create a folder

Use mkdir when you want to make a new folder. mkdir means "make directory."

mkdir: create a folder zsh · ~
Ready. Press Replay to run the scripted session.

If project appears in the list, it worked.

8. Where do I install opencode?

This post only covers the terminal and basic commands. The AI coding tool opencode is covered in a separate series on this blog.

After installing opencode, you can run it by typing opencode in the terminal and pressing Enter. It is not required right now. You can install it after creating the project folder in the next post.

9. What we will do next

You are done for today if...

After this post, you do not need code. It is enough if you have opened the terminal and tried pwd, ls, cd, and mkdir once each.

In the next post, we will use the terminal to create the myproject01 project folder.

  • Create the myproject01 project folder.
  • Prepare a place for docs/ and agent.md inside it.
  • Decide where future design documents will go.

If you can open the terminal and create a folder, the next post will not be difficult.

💬 댓글

이 글에 대한 의견을 남겨주세요