liveBook · Manning

Terminal

As explained in Build Applications with Local AI Models on a Mac

Terminal is the macOS application for accessing a command-line interface.

Terminal is the macOS application for giving your computer typed commands. It provides a command-line interface (CLI): instead of clicking icons and menus in a graphical user interface (GUI), you type instructions and read text results. It is the starting point for running Ollama, Python, and Streamlit. section 1.5.1 section 1.5

To get started:

  • Press Command-Space, type Terminal in Spotlight Search, and press Enter. section 1.6.1
  • Look for the prompt. It means the terminal is ready for a command; it is not an AI prompt that understands everyday requests. section 1.5.1
  • Try pwd to show your current location, ls to list files and folders, cd to change directories, and mkdir to create a folder. section 1.9
yourname@MacBook-Air ~ %

This sample prompt shows a username, computer name, current location (~, the home directory), and the % prompt symbol. Yours may look different; a $ symbol can indicate the Bash shell instead of Zsh. section 1.5.1

What happens when you run ls?

Type ls and press Enter. Terminal passes your input to the shell, the program running inside its window. The shell searches PATH for the ls program, which lists the current directory’s contents. Terminal displays the result, then shows a fresh prompt. If a command keeps running when you want it to stop, press Ctrl-C. section 1.7.5

How Build Applications with Local AI Models on a Mac covers it

How deep it goes
Explains the prompt and traces a command through the shell, PATH, execution, output, and return to the prompt.
Examples
Uses a sample macOS prompt, Spotlight Search, and ls to show opening Terminal and running a command.
What it assumes
Starts without assuming terminal familiarity and introduces typed commands by contrasting them with clicking icons and menus.
What you can do after
Operate/configure it to open Terminal, navigate folders with basic commands, and cancel a running command with Ctrl-C.
How it connects
Connects the CLI and GUI to the operating system, and distinguishes Terminal from the Zsh or Bash shell inside it.

Related concepts

This explainer was generated by Manning's knowledge graph from the text of Build Applications with Local AI Models on a Mac. The section links point to the parts of the book it draws on.