The player could not load. Watch it on YouTube instead.
Terminal for new Mac users: opening it, setting it up, and the commands worth knowing
MAC新手适用 | MACOS terminal(终端)开启,配置和常用命令
About this video
Five minutes on Terminal for someone who has never opened it: three ways to launch it, how to switch between bash and zsh with chsh, where the window's font and colours live, and about twenty commands grouped by what they act on — the clock, the path, folders, files. It is plain and unhurried, and the parts that matter most are the ones it shows going wrong.
Five minutes, no third-party anything: the video opens Terminal, changes how it looks, and walks through about twenty commands, most of which are the ones a new Mac user is told to run without being told what they do.
The first section saves the most time. Terminal is in Applications → Utilities, and the video shows three ways to get there — Spotlight with ⌘Space, a new Finder window with ⌘N and then navigating down, and ⌘⇧U, which jumps straight to the Utilities folder from wherever Finder happens to be. The third is the one worth remembering, because it lands you in the folder rather than making you walk to it.
Then bash and zsh. chsh -s /bin/zsh and chsh -s /bin/bash change the shell an
account uses; each asks for the account password, and cat /etc/shells prints
what is actually installed — on the Mac in the video, seven shells from
/bin/bash to /bin/zsh. What the video does not spell out is that chsh
affects new sessions, and that switching to bash visibly degrades the prompt: by
the end of the section the prompt has fallen back to bash-3.2$, because bash
does not read the zsh startup files. That is not a fault. It is what an
unconfigured bash prompt looks like.
The commands are grouped the way a beginner needs them. date, cal and time
for the clock. cd, pwd and cd ~ for moving around — and the point the video
makes by accident, because its prompt prints the folder you are in, is that pwd
is how you find out where a cd you did not mean has left you. mkdir and
rmdir for folders; touch, open and rm for files, where open launches a
file in whatever app owns it.
There is one instructive failure. The description lists mvdir dir1 dir2 among
the folder commands, and on screen it returns bash: mvdir: command not found —
mvdir is not a macOS command. The video moves on, which is the right instinct;
mv is the one to reach for. The last section has the real power and the real
risk: chflags hidden and chflags nohidden set and clear a file’s hidden
attribute, rm on a directory fails with is a directory (which is what rmdir
is for), and defaults delete com.apple.dock; killall Dock wipes the Dock’s
preferences and restarts it, resetting it to defaults. killall restarts any
process by name, so the same pattern reaches well beyond the Dock.
None of this needs installing. If the question is which terminal to use rather than what to type in it, the best terminal emulators for Mac are a separate decision from the commands themselves.
What it covers
- ⌘⇧U is the shortest route to Terminal: it opens the Utilities folder from anywhere in Finder
- chsh -s /bin/zsh and chsh -s /bin/bash change the shell an account uses, and each asks for the account password
- cat /etc/shells prints the shells actually installed — seven of them on the Mac in the video
- A newly switched bash prompt reads bash-3.2$ because bash does not read the zsh startup files
- date, cal and time answer three different questions about the clock
- pwd is how you find out where a cd left you, since the prompt only shows the folder name
- mvdir is not a macOS command; mv is the one to reach for
- rm refuses a directory — rmdir removes an empty one
- chflags hidden and chflags nohidden set and clear a file's hidden attribute
- defaults delete com.apple.dock followed by killall Dock resets the Dock to its defaults
Chapters
No chapter list is published with this video. Times were read off the recording itself, so each one marks where that topic is on screen — close to the start of a section, not exact to the second.
Apps in this video
No app page is linked. Terminal ships with macOS and is configured here through its own Profiles panel; no third-party terminal, shell or plugin appears at any point, so none is claimed.
