LV1 · 0 XPLog in
Learning path

Lesson 1 of 3 · PowerShell & CLI Automation

PowerShell vs bash/zsh

The terminal concepts are shared across systems, even when PowerShell and Mac shells spell commands differently.

This lesson is locked. You can read ahead, but finish earlier stops to earn progress.

Listen

Watch

Video coming soon

Read

A shell is your command interpreter

PowerShell is the usual modern shell on Windows; macOS commonly uses zsh, and bash is another widely used shell. A shell reads what you type and runs commands. You will use one to create the folders and starter files for your studio project, so first identify which shell is open.

Many core ideas match: cd changes directory, ls lists items and mkdir creates a directory. In PowerShell, ls and mkdir are familiar aliases; in zsh they are standard Unix commands. If a command behaves unexpectedly, check the shell prompt and its help rather than assuming all syntax is identical.

Learn the spelling differences

PowerShell’s ni is an alias for New-Item and can create a file. On macOS, touch is commonly used to create an empty file. In either case, include a path so you know where the new file will appear. These are different spellings for a similar outcome, not proof that every shell feature is interchangeable.

GoalPowerShellbash/zsh on Mac
Change foldercdcd
List itemslsls
Create foldermkdirmkdir
Create empty filenitouch

Chain commands carefully

A semicolon runs the next command after the previous one, even if the first failed. The && operator runs the next command only if the previous command succeeds. On Mac, && is a common way to make a sequence stop when a step fails. PowerShell versions differ in their support for &&, so use separate lines when unsure, or check your version.

text
cd studio-cli && ls

This example changes into a folder and lists it only if changing folders worked. That matters when you are scaffolding: a later file command should not quietly run in the wrong place.

Apply the ideas to your project

For quest 0.6, use your shell’s equivalent commands to create a project folder, its asset folders and the required starter files. Confirm the current location with pwd on Mac or Get-Location in PowerShell, then list the result recursively. Translate the intent—“make a directory” or “create a file”—rather than memorising one operating system’s spelling. A shell script can automate repeated commands, but for a first scaffold, run and verify each step so mistakes are visible.

Identify the shell before translating syntax

In PowerShell, inspect $PSVersionTable.PSVersion. Windows PowerShell 5.1 and PowerShell 7 are different releases: && command chaining is supported in 7+, not 5.1. On Mac, echo $SHELL reports your configured shell; the VS Code terminal profile can differ, so check it too.

A command, its options and its path are separate arguments. Quote paths containing spaces. A semicolon starts the next command regardless of whether the first succeeded; && runs it only after success where supported. Separate lines and explicit checking are clearest for a first scaffold.

Use full names when learning a PowerShell alias. Get-Alias ls shows what ls maps to; Get-Command New-Item identifies the command. An alias in one shell is not proof the other shell has the same flags or output. In older PowerShell, curl may be an alias; curl.exe explicitly invokes the network tool used later.

Practise the same intention in each system

On Mac, create a disposable folder and empty note with mkdir and touch. In PowerShell, use New-Item with the explicit ItemType Directory/File. Verify the result with your shell's listing command. Translate “create an empty file here” rather than copying syntax from the wrong platform. The next lesson provides both complete variants and an expected tree.

Before assessment, name the shell you used, explain quoting and choose a supported command sequence. If an error says an option/argument is invalid, check the actual shell and command before assuming your entire computer setup is broken.

Key terms

Shell
A program that interprets terminal commands.
PowerShell
A command shell commonly used on Windows.
zsh
The default shell on many macOS systems.
Command chain
Multiple commands run in sequence with a chosen success rule.

Summary — copy into your notes

  • PowerShell and zsh share terminal concepts, not every spelling.
  • Use cd, ls and mkdir to navigate and create folders.
  • PowerShell ni and Mac touch can create empty files.
  • Use && when later commands should depend on earlier success.