Apply for the next session

Lesson Intro

OK! So, there’s more stuff. Yep.

Now that we’ve talked about all the ‘clicky’ Graphical User Interface stuff in extreme detail, let’s explore the Command Line.

The goals

  1. OH YEAH...

    More about the Finder settings! Set the sidebar and some general finder preferences.

  2. Zoom in and out with - basically everything

    (it’s: command &   or +) Try it!

  3. Understand "file paths"

    How the system organizes files with paths.

  4. Intro to "Terminal"

    Some computers don’t have Graphical User Interfaces, so you use the command line.  Serious HACKERS session.

SPACES recap

In the future, it’s likely that you will have some utility type apps or helpers that you need around. Confine them to a space and keep them available to you but out of the way. This may be things like a terminal window, an email client, or some webpage you are trying to keep open for communication.

Mission control (spaces) options

We recommend unchecking the first option and leaving the rest alone. It is confusing when the spaces automatically move based on recent use.

Application menus

Each application is unique, but they also share some similar bits. They share a similar menu system. They usually have Files which can usually be Edited. You have to View them. You’ll need to view them in the Window that the OS provides. And you’ll probably need Help sometimes (Go? Who knows… Apple).

Sometimes there’s a Format menu or who knows what. But there’s a pattern. The Application bar has some common logic to it. You can count on it.

Tabs

There are Tabs like you may be used to in the browser, but in the finder, they seem pretty useless. What do you think? Try moving some things from one tab to another.

The file path

You can see it in many ways. At the core, it’s just some organization. There are plenty of file types and places to keep them.

Your home folder is your Username.

Macintosh Hard Drive / Users / YourUserName

This would be your Root folder.

Having a short computer name and username can make things a bit easier to read.

If you think about it, this is a lot like a set of instructions

  • Go to the garage
  • Look up on the top shelf
  • Now, go to the box labeled “sports stuff”
  • Look for the basketball
  • Pick it up

Computers used to be bigger

IBM System/360 Model 85

(and way cooler looking)

The Terminal

wikipedia

The term “terminal” harks back to when computers were so big they’d fill up cabinets or even whole rooms. A terminal was basically a monitor (text-only) and a keyboard setup that let you operate the computer from afar through a direct, wired link. You could hook up several terminals to one computer, so multiple people could use it simultaneously.

MS DOS

Wikipedia

Before Graphical user interfaces (even on our personal computers at home), we had things like Microsoft Disk Operating System.

This terminal is a similar experience.

(note that MS uses a back-slash  \  and Mac uses a forward-slash  / )

The virtual terminal

Unlike the old physical terminals that were separate pieces of hardware for interacting with computers, the macOS Terminal is a software application that emulates a command-line interface within the operating system. This virtual terminal allows you to interact with the underlying system through a shell, just as physical terminals did with older computers, but without the need for separate hardware.

Here’s a start with how to move around the file system with the terminal (aka the command line).

Print Working Directory: pwd

Change Directory: cd (needs a file-path too, so cd file-path-goes-here)

List Files: ls

Make Directory: mkdir (needs a directory name, so mkdir my-directory-name)

touch (needs a file-name.extension): creates a file touch hello.txt

nano (needs the file name) (details)

What else???

cd ~/ (gets you back to the root folder, but just using cd does that too)

cd ~/a/b/c

Unix systems (like Linux and macOS) use command names that are often short to make them quick to type and easy to remember, which is a big plus for something you use a lot. ls probably comes from “list,” and it does exactly that—it lists your directory contents in a snap. Keeping command names short and mnemonic is pretty standard in Unix tool design. Naming things is hard. ls seems weird to us. What would you have chosen?

Terminal will need permission to use your files

This is a newer security feature for Mac. Now it asks you to explicitly give each program permission to use your files. Because if they didn’t then Mark would try and look at your photos.

You might not see the window pop up or you might close it by accident. So, if your terminal isn’t able to access your files then this is why! This is a good thing to think about for any application that isn’t working.

Exercises

  1. Practice navigating the file system with Terminal

    The regular terminal is fine. But for some reason, we use iTerm 2. Less is more.

    30 minutes suggested
  2. Markup a few famous websites

    Find a few “famous” websites and draw some boxes on your favorite features using the screenshot software we talked about.

    30 minutes suggested
  3. Try zooming in and out

    Test it in a bunch of different applications and situations. If you have a trackpad, you can spread your fingers out across it and pinch to zoom in and out in many situations.

    10 minutes suggested
  4. Any hidden files?

    Check your “user” (home) folder for any hidden files.

    5 minutes suggested

Terminal commands cheetsheet

Terminal

Terminal basics

$        (this $ represents your prompt) (you do not type it)

$ pwd    (print working directory to the console)

$ ls     (list items in directory)

$ cd     (change directory) (will go home if no path given)

$ cd a-folder-name/or-a-file-name  (change to a specific folder or directory)

$ cd ..  (go up one level in the directory structure)

$ cd ../folder   (go up one level and change into another directory)

$ mkdir directory-name   (create a new directory)

$ rmdir directory-name   (remove an empty directory)

$ touch file-name        (create a new file or update the timestamp of an existing file)

$ nano file-name         (opens file in nano) (a command-line text editor)

$ rm file-name           (remove a file)

$ mv old-name new-name   (move or rename files or directories)

$ cat file-name          (display the content of a file on the terminal)

$ echo 'text'            (display a line of text/string on the terminal)

https://support.apple.com/guide/terminal/welcome/mac

Focus on getting good with those before you try and learn any more of them.

Newly introduced settings

  1. New Finder window show:
  2. Set default finder options
  3. Remove/hide recents folder
  4. Show path bar
  5. Change name of computer
Apply for the next session