PTENES
MODULE 2.3

💻 Getting to Know the Terminal

Master the essential terminal commands — the indispensable tool for working with MCP Servers.

6
Topics
30
Minutes
Basic
Level
Practical
Type
1

💻 What Is the Terminal

The terminal is a text interface that lets you control your computer by typing commands instead of clicking icons. Although it may seem intimidating at first, the terminal is the most powerful tool available to a developer. All MCP Servers are started, tested, and debugged from the terminal — mastering it is essential for this course.

💎 Core Concept

O terminal (also called a console, shell, or command line) is a text-based interface for interacting with the operating system. While a graphical interface limits you to the options visible on the screen, the terminal gives you direct access to everything that the system can do. In the macOS, use Terminal or iTerm2. On Windows, use PowerShell or WSL (Windows Subsystem for Linux). On Linux, any terminal emulator works (GNOME Terminal, Konsole, Alacritty, etc.).

💡 Practical Tip

Think of the terminal as the more powerful remote control of your computer. The graphical interface is like the buttons on a TV remote—it limits you to a few predefined functions. The terminal is like having access to the TV's engineering menu: you can do absolutely anything, as long as you know the right command. And in the world of MCP, everything happens in the terminal.

2

📂 Navigating Between Folders

Navigating the file system is the most fundamental terminal skill. Just as you click folders in a file explorer, in the terminal you use commands to enter directories, list their contents, and find where you are. You’ll use these commands constantly when working with MCP Servers.

💎 Core Concept

The essential navigation commands are:

  • cd pasta — Enters a directory (Change Directory)
  • ls — Lists files and folders (Mac/Linux). On Windows: dir
  • pwd — Shows the current directory (Print Working Directory)
  • cd ~ — Goes to the user's home directory
  • cd .. — Goes up one level (parent directory)
📋 Step-by-Step Navigation
Step 1 — Find out where you are

Execute pwd to see your current directory. You usually start in the home folder: /home/seuusuario (Linux) or /Users/seuusuario (Mac).

Step 2 — See what's here

Execute ls to list files and folders. Use ls -la to see hidden files and details such as size and modification date.

Step 3 — Navigate and explore

Use cd Documents to enter the Documents folder. Use cd .. to go back. Combine: cd ../outra-pasta go back and enter another folder in one go.

❌ Avoid
  • •Manually typing long paths
  • •Use spaces in folder names without quotes
  • •Run commands without knowing where you are
  • •Ignore error messages
✅ Do
  • •Use Tab to autocomplete paths
  • •Always verify with pwd before acting
  • •Use cd ~ to quickly return to home
  • •Practice navigation daily
3

📄 Working with Files

In addition to navigating, you need to know how to create, copy, move, and delete files and folders from the terminal. These operations are essential for organizing your MCP projects, creating configuration files, and managing your servers’ source code.

💎 Core Concept

The essential file manipulation commands are:

  • mkdir pasta — Creates a new folder (Make Directory)
  • touch arquivo — Creates an empty file (Mac/Linux). Windows: echo. > arquivo
  • cp origem destino — Copies a file
  • mv origem destino — Moves or renames a file
  • rm arquivo — Deletes a file (permanently!)
💡 Practical Tip

Practice by creating the structure of an MCP project:

mkdir meu-mcp-server
cd meu-mcp-server
touch server.py README.md
mkdir src tests
🚨 Alert

Use extreme caution with rm -rf! This command permanently deletes folders and all their contents, without a trash bin, confirmation, or any possibility of recovery. Never run rm -rf / or rm -rf ~ — this can destroy your entire system. Always check the path with pwd e ls before deleting anything.

4

📝 Editing Files

To create and modify MCP Servers, you need to edit code files. There are text editors in the terminal (such as nano and vim) and graphical editors with terminal integration (such as VS Code). For this course, we recommend VS Code as the main editor and the nano as a quick alternative in the terminal.

💎 Core Concept

The three most useful editing tools for the course:

  • nano arquivo — A simple terminal editor. Ctrl+O to save, Ctrl+X to exit. Ideal for quick edits.
  • code arquivo — Opens in VS Code. Requires VS Code to be installed and the command code configured in the PATH.
  • cat arquivo — Displays a file's contents in the terminal without editing it. Useful for quickly checking settings.
❌ Avoid
  • •Use vim without knowing how to exit (type :q!)
  • •Edit system files without sudo
  • •Use Notepad for code (Windows)
  • •Saving files with the wrong extension
✅ Do
  • •Use VS Code with the Python/TS extension
  • •Use nano for quick terminal edits
  • •Use cat to check contents
  • •Install syntax highlighting extensions
5

🔍 Searching and Filtering

As your projects grow, finding files and searching for specific text in your code becomes essential. The terminal offers powerful search tools that are much faster than any graphical interface — especially useful for debugging MCP Servers and finding configurations.

💎 Core Concept

The three essential search tools:

  • find . -name "*.py" — Searches for files by name. The dot (.) means "starting from the current directory".
  • grep "texto" arquivo — Searches for text inside files. Use -r to search recursively through folders.
  • | — The pipe chains commands: the output of one becomes the input of the next. Example: ls | grep "server".
💡 Practical Tip

Practical examples for MCP projects:

grep -r "fastmcp" . — Finds all references to FastMCP in the project
find . -name "*.json" — Lists all JSON files (MCP configuration)
cat config.json | grep "server" — Shows lines containing "server" in the configuration
📊 Data and Research

Developers who master the terminal are, on average 30% more productive than those that rely exclusively on graphical interfaces, according to Stack Overflow research. The command grep is used alone billions of times per day around the world. Modern tools like ripgrep (rg) are even faster — searching projects with millions of lines in milliseconds.

6

⚡ Essential Shortcuts

Mastering terminal keyboard shortcuts transforms your work speed. Instead of typing every character in a long path, you can autocomplete with Tab. Instead of retyping a command, you can retrieve it from your history. These shortcuts may seem small, but they save hours over the course of a project.

💎 Core Concept

The four shortcuts every MCP developer needs to know:

Tab

Autocompletes file, folder, and command names. Press twice to see all options.

↑ / ↓

Browse command history. Retrieve any previous command without retyping it.

Ctrl + C

Cancels the current command. Essential for stopping running MCP Servers.

Ctrl + L

Clears the terminal screen. Equivalent to the command clear.

💡 Practical Tip

Bonus shortcuts that make your workflow even faster:

  • •Ctrl + R — Searches command history. Type part of an old command and it appears automatically.
  • •Ctrl + A / Ctrl + E — Goes to the beginning/end of the line. Useful for correcting long commands.
  • •Ctrl + W — Deletes the previous word. Faster than holding Backspace.
  • •!! — Repeats the last command. sudo !! reruns the last command with sudo.

📝 Module Summary

  • ✓ The terminal is the text interface for controlling the computer — essential for working with MCP Servers.
  • ✓ Navigation with cd, ls, and pwd lets you move between directories and understand project structure.
  • ✓ Using mkdir, touch, cp, mv, and rm lets you create and organize the structure of your MCP projects.
  • ✓ Editors like nano and VS Code are enough to write all the MCP Server code in the course.
  • ✓ find, grep, and pipe (|) let you search files and text quickly and efficiently.
  • ✓ Shortcuts like Tab, arrow keys, Ctrl+C, and Ctrl+L dramatically speed up your work in the terminal.

Next Module: 2.4 — Installing Claude Desktop