IT Essentials v6.0 macOS Software Labs

10.1.1.1 Setup and Configure macOS ...... 1 10.1.1.2 About This Mac ...... 20 10.1.1.3 Basic in macOS ...... 25 10.1.1.4 Install Software in macOS ...... 45 10.1.1.5 Common System Utilities in macOS ...... 52 10.1.1.6 Task Scheduler in macOS ...... 60 10.1.1.7 Terminal Commands in macOS ...... 65

10.4.1.1 Lab – Setup and Configure macOS

Introduction In this lab, you will setup macOS 10.12 Sierra in VMware Player on Windows

Recommended Equipment • VMware Player 12.5 or higher • macOS VMware Image file

System requirements • 2GB of Memory (minimum) 4GB or higher (recommended) • Number of Processors: 2 (minimum) 4 (recommended) • Graphics memory: 256 MB

Part 1: Prepare for installation

Step 1: Install VMware Workstation on Your PC a. Download and install VMware player 12.5 or higher to your Windows PC. b. Extract macOS Sierra VMware Image File c. Download the macOS VMware Image file. d. Once you have downloaded the macOS VMware Image file, then you must extract it using WinZip, WinRAR, 7zip, or Windows Expand. Save it to the Virtual Machines folder or ask your instructor for help with the location. This file contains a macOS 10.12 Sierra folder, unlock208 folder, VM Tools.iso, and instructions.

Step 2: Install Mac Patch Tool for VMware a. Open the unlocker208 folder. b. Right click win-install.cmd and Run as Administrator.

© 2017 All rights reserved. This document is Public. Page 1 of 19 1 of 83 Lab – Setup and Configure macOS

Step 3: Open a Virtual Machine a. Open VMware Workstation 12 Player. b. Click on Open a Virtual Machine.

c. Locate and open the macOS10.12 VMware Image folder (from Step 2). Open the macOS 10.12 Sierra folder and click on the macOS 10.12.vmx file, then click Open.

© 2017 All rights reserved. This document is Public. Page 2 of 19 2 of 83 Lab – Setup and Configure macOS

Step 4: Edit the Virtual Machine Settings a. You will see the macOS 10.12 Sierra name appear on the left under Home. Select macOS 10.12 Sierra and click Edit virtual machine settings. Note: After the virtual machine has been created, don’t turn it on, otherwise you might lose the virtual machine and have to begin the steps again from the beginning.

Step 5: From the Virtual Machine Setting window you will customize the settings: a. Increase memory to 4GB if your system allows it. b. Increase the Number of processor cores to 4 if your system allows it.

© 2017 All rights reserved. This document is Public. Page 3 of 19 3 of 83 Lab – Setup and Configure macOS

Step 6: Edit the Virtual Machine (VMX) a. Navigate to the macOS 10.12 Sierra.vmx file in the macOS Sierra virtual machine folder. Right-click on it and open it with Notepad.

b. Scroll to the end and type smc.version = “0”. c. Save and close the file.

© 2017 All rights reserved. This document is Public. Page 4 of 19 4 of 83 Lab – Setup and Configure macOS

Part 2: Install macOS 10.12 Sierra

Step 7: Setup your Mac a. To start the virtual machine, click on Play virtual machine.

Note: If you get a popup that says Failed to lock the file, open the macOS 10.12 Sierra folder and delete the macOS 10.12 Sierra.vmdk.lck file.

© 2017 All rights reserved. This document is Public. Page 5 of 19 5 of 83 Lab – Setup and Configure macOS

b. With the VM powered on, the first screen you’ll see is the “Choose a language page.” Select Use English for the main language and click Continue .

c. The macOS Utilities page will appear. Select Install macOS and click Continue.

© 2017 All rights reserved. This document is Public. Page 6 of 19 6 of 83 Lab – Setup and Configure macOS

d. The Install macOS Sierra page appears. Click Continue.

e. The License agreement appears. Click Agree and Agree again on the popup.

© 2017 All rights reserved. This document is Public. Page 7 of 19 7 of 83 Lab – Setup and Configure macOS

f. Select the disk where you want to install macOS. Select HD and click Install.

g. The installation process will begin. This will take several minutes. Note: Do NOT Stop or Cancel this process.

h. The machine may restart several times during installation. This will take several minutes.

© 2017 All rights reserved. This document is Public. Page 8 of 19 8 of 83 Lab – Setup and Configure macOS

Part 3: Personalize macOS 10.12 Sierra a. After the reboot, the Welcome page appears. Choose your country then click Continue.

b. Choose a keyboard layout and click Continue.

© 2017 All rights reserved. This document is Public. Page 9 of 19 9 of 83 Lab – Setup and Configure macOS

c. Select Don’t transfer any information now and click Continue.

d. It’s your choice whether you allow or disallow location services. For this exercise, do not check Enable Location Services on this Mac. Click Continue.

e. You will get a popup asking Are you sure you don’t want to use Location Services? Click Don’t Use.

© 2017 All rights reserved. This document is Public. Page 10 of 19 10 of 83 Lab – Setup and Configure macOS

f. Enter your Apple ID/password and click Continue. Note: If you don’t have an Apple ID, click Create new Apple ID… and follow the steps. Ask your instructor for help.

g. Read the Terms and conditions fully and click Agree.

© 2017 All rights reserved. This document is Public. Page 11 of 19 11 of 83 Lab – Setup and Configure macOS

Step 8: Personalize Your Mac a. Create an account by filling out the required details then Continue. 1) Full Name: Student 2) Account name: student 3) Password: student 4) Hint: Generic account

b. Select your time zone by clicking on the map or typing in a city name.

© 2017 All rights reserved. This document is Public. Page 12 of 19 12 of 83 Lab – Setup and Configure macOS

c. Help Apple improve its products and services automatically by having Diagnostics & Usage. Click Continue.

d. Your Mac will display the Setting up Your Mac… screen.

© 2017 All rights reserved. This document is Public. Page 13 of 19 13 of 83 Lab – Setup and Configure macOS

e. You will return to the main desktop.

Step 9: Install VMware Tools a. If you see the VMware Tools dialogue box at the bottom of the VMware Window, click on Never Remind Me.

b. Click on the Player dropdown and select Removable Devices > CD/DVD (SATA) > Settings.

© 2017 All rights reserved. This document is Public. Page 14 of 19 14 of 83 Lab – Setup and Configure macOS

c. Click on Use ISO image file: and then click on Browse.

d. Locate the macOS Sierra folder and select VM Tool.iso. Click Open.

e. After a few moments, the VMware Tools window will appear. Double click on Install VMware Tools.

© 2017 All rights reserved. This document is Public. Page 15 of 19 15 of 83 Lab – Setup and Configure macOS

f. The install VMware Tools windows appears. Click Continue.

g. Select the MacOS… and click Continue.

h. Click Install.

© 2017 All rights reserved. This document is Public. Page 16 of 19 16 of 83 Lab – Setup and Configure macOS

i. Enter the username: student and password: Student. Click Install Software

j. Click Continue when the dialogue box telling you the computer will have to restart.

k. Click Restart.

© 2017 All rights reserved. This document is Public. Page 17 of 19 17 of 83 Lab – Setup and Configure macOS

l. After the restart, log back in. m. Close all open windows. n. Right click on VMware Tools and Select Eject “VMware Tools” on the desktop.

o. Installation in now complete. Note: If you see the VMware Tools dialogue box at the bottom of the VMware Window, click on Never Remind Me.

© 2017 All rights reserved. This document is Public. Page 18 of 19 18 of 83 Lab – Setup and Configure macOS

Reflections

1. Were you able to install macOS correctly? ______

2. What was the purpose of altering the .VMX file? ______

3. Why do you need an AppleID? ______

© 2017 All rights reserved. This document is Public. Page 19 of 19 19 of 83

10.4.1.2 Lab – About This Mac

Introduction You are thinking about selling your Mac. You want to accurately let the buyer know what they are getting. In the lab, you need to identify the model, version, serial number, and other information about your Mac.

Required Equipment • A computer running macOS

Part 1: Open About This Mac a. Boot your Mac and log in. b. Click on the black Apple logo in the top left-hand corner. c. Click on About This Mac.

d. On the Overview tab, you will be able to see your version, your Mac's model, basic hardware information and serial number (it's best to keep your serial number confidential). Note: the Mac’s model and release date are not available in VMware.

© 2017 All rights reserved. This document is Public. Page 1 of 5 20 of 83 Lab – About This Mac

e. The Displays tab will show you information about the monitor’s size, resolution, and memory.

f. The Storage tab will show you information about all the drives connected to your Mac and how they are being used

g. The Memory tab will show you information about how much memory you have installed and upgrade capabilities.

© 2017 All rights reserved. This document is Public. Page 2 of 5 21 of 83 Lab – About This Mac

h. The Support tab will give you support options about the operating system and hardware.

i. The Service tab will give you information about your warranty and AppleCare.

j. To get more information about your Mac, click on the Overview tab and click the System Report button.

k. A window will open showing detailed information about the hardware, network and software components within your Mac.

© 2017 All rights reserved. This document is Public. Page 3 of 5 22 of 83 Lab – About This Mac

l. Using the System Report, collect the following information: 1) Model Name: 2) Model Identifier: 3) Processor Speed: 4) Number of Processors: 5) Total Number of Cores: 6) Memory: 7) Startup Disk: 8) Serial Number: 9) Ethernet Card Model: 10) Display Resolution: 11) Pixel Depth: 12) AC Power Sleep Timer: 13) Macintosh HD Capacity: 14) IPv4 Ethernet Address: 15) Ethernet MAC Address: 16) App Store Version: 17) Version: 18) Version: 19) Times New Roman Font Version: 20) VMware Tools Version and Source:

Part 2: Software Updates m. From the Overview tab, click on Software Update…. n. You will be taken to Update tab in the App Store. If any updates are available, update and install them now. Restart if necessary. o. Repeat this process until all updated have been installed.

© 2017 All rights reserved. This document is Public. Page 4 of 5 23 of 83 Lab – About This Mac

Reflection

1. Why is it important to know the information found in About This Mac? ______

2. What information can be obtained from the Services tab? ______

3. What information can be obtained from the Storage tab? ______

4. What information can be obtained from the Overview tab? ______

5. Why is it important to run updates? ______

© 2017 All rights reserved. This document is Public. Page 5 of 5 24 of 83

10.4.1.3 Lab – Basic System Preference in macOS

Introduction In this lab, you will examine and configure a few of the basic System Preferences of the macOS. Note: See the “Advanced System Preferences in macOS” lab to find information about the rest of the System Preferences.

Required Equipment • A computer running macOS

Part 1: Basic System Preferences

Step 1: Open System Preferences a. Click on the Black Apple icon in the Upper Left Corner and select System Preferences.

System Preferences controls system-wide settings ("global" settings). System Preferences lets you adjust things like your screen resolution, keyboard control, mouse control, sound, printer settings, sharing settings, accounts, and more. You can quickly locate the settings you want to change by typing the desired subject in the search field. For example, to change your login password, type "password." The preferences related to password appear below the search field, and one or more preferences will be spotlighted in the System Preferences window. Click the item in the list that matches what you want to do, or click one of the spotlighted preferences. Click and hold the Show All button to see a list of all System Preference panes. Third-party apps may also install their own pane within System Preferences for configuring some application settings. Check the documentation that came with the app, or the app Help menu for information about its settings.

© 2017 All rights reserved. This document is Public. Page 1 of 20 25 of 83 Lab – Basic System Preferences in macOS

Step 2: How to customize System Preferences There are two different kinds of customization worth noting with system preferences: the panes that are installed and the panes that are visible. By default, macOS will provide you with about 30 panes (the exact number is determined by the hardware you are using - for example, if you have no optical drive, “CDs and DVDs” will not be shown), but third-party products may also install into System Preferences. Such panes are initially placed at the very bottom of the window. a. You can reorder the panes by using the View menu. You can Organize by Categories or Organize alphabetically. b. To show or hide icons, click View > Customize. Checkboxes appear next to each icon. c. Deselect any icon's checkbox and click View > Customize to uncheck. The icon will be hidden. Note: It will remain accessible from the View menu and when performing searches. d. Show an icon by using View > Customize, selecting the icon’s checkbox and clicking View > Customize to uncheck.

© 2017 All rights reserved. This document is Public. Page 2 of 20 26 of 83 Lab – Basic System Preferences in macOS

Step 3: General Preferences The General pane is a collection of options related to appearance, scroll bars, document behavior and the number of recent items shown in the .

a. The Appearance menu determines the button, menu and window theme for your Mac, enabling you to switch between Blue and Graphite. This affects default buttons in dialogs, selected menu items, and the close/minimize/full-screen buttons at the top-left of most app windows. With the Graphite theme, all of these are grey. In the Blue theme, you get the familiar “traffic light” buttons at the top-left of windows and blue buttons/selected menu items elsewhere. 1) The Use dark menu bar and Dock checkbox turns the menu bar and Dock black, rather than white, to better fit in with some professional applications that have dark interfaces. This option also adjusts 's appearance. 2) The Automatically hide and show the menu bar option hides the menu bar unless the cursor is at the top of the screen, in a similar manner to how you can show and hide the Dock. b. Highlight color enables you to change the color of highlighted content such as selected text in documents. Apple provides a list of colors you can choose from, but you can define your own by selecting Other and using the standard Mac color picker. Set the Highlight color to Yellow. c. Sidebar icon size gives you alternate options for the size of icons in 's sidebar. Medium is the default, Large is good if you find it hard to accurately click the existing icons, and Small is the best choice if you have a small display or like squinting a lot. Note that the setting you define here also affects the sidebar in Mail.

© 2017 All rights reserved. This document is Public. Page 3 of 20 27 of 83 Lab – Basic System Preferences in macOS

d. Show Scroll Bars adjusts how scroll bars in macOS behave. By default, they are not visible, but show automatically when you move your mouse or trackpad over them, their visual appearance in part defined by the input device. You can adjust this so that they only show when scrolling regardless of the input device or always show when content is too big for the viewport. The last of those options provides much thicker scroll bars than what you usually see when scrolling; instead, their appearance is like when you hover over a MacOS scroll bar and it widens for drag-based interaction. e. Set the Show scroll bars to Always. f. The Click in the scroll bar to setting changes how macOS jumps to content when you click inside a scroll bar. 1) With Jump to the next page selected, content jumps in screen-heights or pages, in the direction of your click. This option is less abrupt but slower. 2) With Jump to the spot that's clicked, it instead jumps to the point in the document relative to the location clicked on the scroll bar. g. The Default web browser menu is a setting that usually exists in a browser's preferences, but you can now define in System Preferences whether or another browser should launch when you click a link. h. The next group of options deals with document behaviors. 1) With Ask to keep changes when closing documents unchecked, changes are automatically saved when documents are closed. By turning on this option, you get the choice to save the changes or revert the document to how it was when last opened. 2) Check the Ask to keep changes when closing documents option. 3) With Close windows when quitting an app unchecked, open documents should reappear as they were when you last closed an application. Check this option and applications will launch without any open documents, unless they have their own built-in settings. 4) Check the Close windows when quitting an app option. i. The Recent items option defines how many items appear in the Recent Items menu in the Apple menu. By default, up to 10 of each type (applications, documents, servers) are shown. Note that any setting chosen also affects recent-item in the Dock. j. The LCD font smoothing when available option makes text appear in a slightly more pleasing manner. Leave this option checked.

© 2017 All rights reserved. This document is Public. Page 4 of 20 28 of 83 Lab – Basic System Preferences in macOS

Step 4: Desktop & Screen Saver Preferences The Desktop & Screen Saver pane is where you adjust your desktop background image and/or the screen saver that kicks in after a user-defined period of time. Note: You can also access this pane by right clicking on your desktop and choosing Change Desktop Background. You will see a thumbnail of the current background image and title. From the pane on the left, you can select collections of images. By default, you will see two items under the collapsible Apple heading (Desktop Pictures and Solid Colors) and one item under the collapsible Folders heading (Pictures). You can add custom folders by using the + button. Note: Apple includes a bunch of folders in /Library/Screen Savers/Default Collections, which are only used for screen savers. They are worth adding if you like wildlife, space and landscape shots. a. Switching the desktop image does not in fact require a trip to System Preferences. In Finder, you can Control-click any compatible image and choose Set Desktop Picture (in the Services sub-menu). If you control-click an image in Safari and you may be able to select Use Image as Desktop Picture, depending on how the site is set up. The System Preferences pane provides a much greater degree of control, along with a central area to access collections of images. b. To change the desktop background, select a collection and then click on any of the images. 1) To have your desktop background change at regular intervals, select a collection and then check Change picture. In the pop-up menu, define how often you would like the background to change; options provided range from 5 seconds to daily, along with login/wake-up. Your desktop background will subtly cross-fade to the next image in the collection. 2) Selecting Random order will randomized the order the pictures appear. c. To help save some processing, select Solid Colors and choose Solid Blue as the background.

© 2017 All rights reserved. This document is Public. Page 5 of 20 29 of 83 Lab – Basic System Preferences in macOS

d. Click the Screen Saver tab to access the screen savers pane. 1) To the left is a selection of built-in screen savers. Select one to choose it as the currently active screen saver or choose Random to have one be selected at random whenever the screen saver is activated. 2) Use the Start after menu to determine how long your Mac remains idle before the screen saver starts. 3) A clock can be overlaid on the screen saver, by checking Show with clock. 4) Depending on the screen saver chosen, you may get options. For the various photography-based screen savers, you will see a Source menu, enabling you to define a source folder of photos to use. On choosing a new source, the screen saver will update accordingly. Checking Shuffle slide order randomizes the presentation from the selection of images. 5) For other screen savers, you will get a Screen Saver Options button that when clicked provides in-context settings for that particular screen saver. For example, Apple's own Flurry enables you to adjust how many streams of color appear on the screen, how thick they are, and how fast they move. 6) To the bottom-right of the pane is a Hot Corners… button. These options are shared with Mission Control and provide the means to trigger various macOS functions when you move the cursor into a screen corner. The first option is Start Screen Saver, and is a very quick means of activating the screen saver. This can be especially useful if you have also used the Security & Privacy pane to demand a password be entered to exit the screen saver. 7) It is also possible to install third-party screen savers. Once installed, these appear below the built-in options. If you later decide you want to delete a screen saver, Control-click it and select Delete. e. Choose Flurry as the Screen Saver starting after 30 Minutes. Check the Show with clock option.

© 2017 All rights reserved. This document is Public. Page 6 of 20 30 of 83 Lab – Basic System Preferences in macOS

Step 5: Dock Preferences Many of the Dock's preferences can be adjusted by control-clicking the thin line that divides apps and folders and choosing from the various options. However, the Dock pane in System Preferences is worth exploring, because it provides a very clear visual overview of all your Dock's settings. a. Size determines the size of the Dock icons. b. Magnification determines how much they expand when the cursor is over them. This is best used so you can easy to pick out the icon you are selecting. If you don’t like the effect, you can disable magnification entirely. c. Position on screen determines the screen edge the Dock sits on. The Dock displays as a rectangle at the left, right edge, or bottom of the screen. d. The Minimize windows using menu provides two effects for when windows are minimized to the Dock: Genie and Scale. The Genie effect appears to draw the window into position. The Scale effect is a much simpler zoom that is less taxing and faster. e. The Prefer tabs when opening documents enables you to state whether new documents should always open in tabs, open in tabs only when an app is In Full Screen mode (default), or only open in tabs manually. Note: Not all apps are compatible with tabs. f. The remaining options adjust various behaviors of the Dock: 1) Double-click a window's title bar to enables you to select between zoom and minimize when making that action. 2) Minimize windows into application icon sends minimized windows to the relevant app icon in the Dock rather than to the Dock's right-hand side. 3) Animate opening applications makes apps bounce while launching 4) Automatically hide and show the Dock makes the Dock disappear from view when not in use and demands you move the cursor to the relevant screen edge to show it. 5) Show indicator lights for open applications places a little black dot beneath the icons of apps that are currently running.

© 2017 All rights reserved. This document is Public. Page 7 of 20 31 of 83 Lab – Basic System Preferences in macOS

g. Change the following settings: 1) Change the Size so the Dock take up the majority of the Bottom of the screen. 2) Turn on Magnification to approximately 50%. 3) Set the Minimize windows using to Scale effect. 4) Check Double-click a window's title bar to and set it to minimize. 5) Check Minimize windows into application 6) Check Animate opening applications 7) Uncheck Automatically hide and show the Dock 8) Check Show indicators for open applications

© 2017 All rights reserved. This document is Public. Page 8 of 20 32 of 83 Lab – Basic System Preferences in macOS

Step 6: Mission Control Preferences a. The Mission Control pane is the place for adjusting how Apple's window overview works. F3 is a Mission Control key. Press it and you see all your open windows. In this screen, you can also create multiple desktops that you can switch between. Apple refers to these as . b. In the System Preferences > Mission Control pane, the first five options determine aspects of how Spaces appear. 1) The first option rearranges spaces based on recent usage, rather like the Command+Tab app-switcher. 2) The second option when active automatically switches you to a space with an open window for an app when the app itself is switched to. 3) The third option sets whether windows are grouped by application. Turn that on and Mission Control groups app windows alongside the app's icon. 4) The fourth option sets whether displays have separate spaces. With this option active, distinct workspaces can be created for each of your displays. (Apple that should you at any point need to have a single app window span multiple displays, you should turn off Displays have multiple Spaces.) 5) Finally, the Dashboard menu enables you to set Apple's widgets screen as a space, as an overlay, or turn it off entirely. As an overlay, you will need to click the Dashboard app icon or use a keyboard shortcut, F12 by default, to activate it. Note: Much of Dashboard's functionality now exists within 's Today view, so see if that works for you before turning Dashboard back on. 6) Check all of the first four checkboxes and set the Dashboard to As Overlay.

c. The Keyboard and Mouse section provides a centralized area to define shortcuts for activating Mission Control and the Application Windows feature, and showing the Desktop or Dashboard. For any keyboard shortcut, you can define a function key or a modifier (a specific Shift, Control, Option or ). You can combine a modifier and a function key: for example, to set Shift+F1 to activate Mission Control, hold Shift, open the Mission Control menu, and click F1.

© 2017 All rights reserved. This document is Public. Page 9 of 20 33 of 83 Lab – Basic System Preferences in macOS

Note: If your Mac keyboard includes a Mission Control icon on its F3 key, modifiers can be used in conjunction with that key in order to access Mission Control functionality: Command+F3 shows the Desktop, and Control+F3 activates the Application Windows feature. d. The Hot Corners button allows any one of the four screen corners to be used as a trigger for Mission Control, Application Windows, show Desktop, or open Dashboard (among other commands, such as showing Notification Center or Launchpad). Reverting any of the menus to the “-“ option deactivates the hot corner entirely.

Step 7: Language & Region Preferences This Language & Region pane controls the language shown in menus and dialog boxes, and the formatting of dates, times and currencies. It will, by default, use the language you stated you wanted to use when you set up your Mac, along with the most appropriate formatting for your location. a. You can add or remove languages from the Preferred Languages list by using the + and - buttons. On adding a new language, macOS will ask whether you want to use it as your primary language. If you confirm this, it will be moved to the top of the list and dialog boxes will change to the selected new language. The addition of a new language will also add a List sort order menu, which you can use to adjust how names are sorted in Finder. Note: Some aspects of macOS may require you to logout and login for changes to fully take effect. b. To the right of the Preferred Languages list, you can update your region setting using the Region menu. If you change it, or example switching between United Kingdom and United States, you will see how other settings are automatically updated to match the region's conventions. Specific elements can be overridden using the menus: the first day of the week, the used, time format, and temperature. With Time format unchecked, the macOS clock will use the 12-hour format typically preferred in the USA. c. Keyboard Preferences takes you to the Input Sources tab within the Keyboard System Preferences pane, where you can define keyboard types for your machine (for example, adding one that's more suited to a particular language you often work in). d. Advanced opens a sheet that provides the means for editing a number of more detailed display options for your chosen region.

© 2017 All rights reserved. This document is Public. Page 10 of 20 34 of 83 Lab – Basic System Preferences in macOS

e. Be aware that changes made here can impact on apps throughout the system, and making major adjustments can have unintended consequences. If you decide you would like to return to macOS's system defaults, go back into the relevant tab and click Restore Defaults (which is initially greyed out, but becomes a clickable button when any changes are made).

Step 8: Security & Privacy Preferences Security & Privacy is perhaps the most is crucial pane to understand, especially when you work with apps that require control over your computer or if your Mac is in a public environment. Note: In order to make changes to the settings within this pane, you will likely have to click the padlock and input an admin username/password. a. The General tab settings here are broadly split into two sections: the first dealing with logins and the second with the ability to install downloaded apps. 1) You can use the Change Password button to alter the password for the currently logged-in user. Click the button and you access a dropdown window where you will type the old password, the new password, and a recovery hint. Note: If you are using an iCloud password to login, you will get a dialog that gives you options to use a separate password, cancel, or change your iCloud password. 2) The three checkboxes are designed to secure your computer during your absence. (i) The Require password checkbox makes it so your login password is required to exit sleep or the screen saver. A time limit can be set to wait a certain amount of time before requiring a password. Check this box and set the time to 1 hour. (ii) The Show a message when the screen is locked checkbox enables you to add a message to the lock screen for anyone who tries to login while the screen saver is running. (iii) The Disable automatic login checkbox allows you to disable automatic login, and requires you to define a default account for the Mac, along with inputting the relevant password.

© 2017 All rights reserved. This document is Public. Page 11 of 20 35 of 83 Lab – Basic System Preferences in macOS

3) The Allow apps downloaded from: section within the pane determines what types of apps the user can download and install. This default setting is App Store and identified developers. Leave the setting alone unless you have a compelling reasons to change it. If you encounter an unidentified developer, you will see a dialog box explaining why the app wan not installed. If you return to this pane, you will be given an option to Allow this app to run. Note: You can launch unsigned apps in Finder by Control-clicking them and choosing Open.

b. The FileVault tab allows you to automatically encrypt your data. With FileVault active, a password is required when booting the Mac to unlock the drive. Without the account password (or a recovery key provided during set-up), you will permanently lose access to your data! Turning FileVault on is simply a case of clicking the sole button on the pane. The drive encryption process can take minutes or hours, depending on the size of the drive and the data on it. Write down the recovery key or enable the key to be stored with Apple, guarded by security questions. FileVault is only protection for your data when the Mac's turned off. When you are logged in, it does nothing, and so is best used in tandem with the previously mentioned password for exiting sleep or the screen saver. If using FileVault, you should also encrypt back-ups in the disk-selection sheet of Time Machine. FileVault can be enabled or disabled at any time. Note: In order to make changes to the settings within this pane, you will likely have to click the padlock and input an admin username/password.

© 2017 All rights reserved. This document is Public. Page 12 of 20 36 of 83 Lab – Basic System Preferences in macOS

c. The Firewall tab is designed to prevent unauthorized apps, programs and services from accepting incoming connections. Note: In order to make changes to the settings within this pane, you will likely have to click the padlock and input an admin username/password. 1) Click Turn On Firewall and then Firewall Options to configure it. Note: Even though most networks have a Firewall built into the router, it is a good idea to always turn on the OS’s Firewall. (i) In the window, you can Block all incoming connections for listed items or add your own using the + button. (ii) By default, Automatically allow built-in software to receive incoming connections is checked. (iii) By default, Automatically allow download signed software to receive incoming connections is checked. (iv) Check the enable stealth mode checkbox, which means your Mac will not respond to any attempts to access it from uninvited traffic. (v) Click OK to save.

d. The Privacy tab is for defining which apps have access to certain services. Such requests are made for various reasons: for example, a calendar app might require access to your calendars in order to work. Apps that control the computer (such as window managers and launchers) will need the means to do so, and permission is provided in the Accessibility section within this tab. There is also a Location Services section, for apps that want to determine your location. Select from the list on the left and use checkboxes on the right to determine the apps that have access to the relevant service. Only deny access for an app you no longer use or that you are certain you no longer want to communicate with the item it requested access to. You can of course change your mind later if you find functionality on your Mac impaired by any decision you make in this tab.

© 2017 All rights reserved. This document is Public. Page 13 of 20 37 of 83 Lab – Basic System Preferences in macOS

e. At the foot of the page is the Advanced button. Click it to open a window with even more options for securing your Mac: 1) The means to log out after a defined period of inactivity 2) A requirement for an administrator password in order to access system-wide preferences that have been locked 3) A setting for disabling commands from an infrared receiver. The Pair button can be used to pair the computer with an available remote.

Step 9: Notifications Preferences a. The Notifications System Preferences pane provides the means to manage and tame macOS’s notifications system, which can be very helpful but also a huge distraction if you have lots of notifications coming in all the time. Turn off banners and get apps out of Notification Center if you don't need notifications from them. b. The Do Not Disturb option allows you to define a time period when notifications won't bother you. You can also turn on Do Not Disturb when mirroring your Mac's display to a TV or projector. Note: When Do Not Disturb is active, the Notification Center icon at the far-right of the menu bar will turn grey. Your System Preferences settings can be manually overridden at any point by opening Notification Center and clicking the Do Not Disturb switch. c. Below Do Not Disturb, you will find a list of apps and how notifications will be sent to you. Select an application and get a set of options. The default settings are designed to best suit the specific application they belong to. They are worth investigating, especially if you are getting overwhelmed with notifications. 1) The first section defines the alert style, from which you can pick None, Banners (which appear in the upper-right corner and vanish after a few seconds) and Alerts (like banners, but require a user action to dismiss them). Simply click an option to select it, and its title will turn blue. 2) Below, you will see up to four options. (i) Show notifications on lock screen defines whether notifications will appear when the Mac is locked. (ii) Show in Notification Center allows notifications to appear in the upper right of the desktop. (iii) The Badge app icon option determines whether a red badge appears on an app's icon when notifications occur (for example, unread emails for Mail). (iv) Play sound for notification will make a noise when a notification appears. 3) Mail and have an additional option, Show message preview that can be set to when unlocked (the default) or always. 4) At the bottom of the window, there is a Notifications Center sort menu. You can set this to sort your notifications by Recents, Recents by App, or Manually by App.

© 2017 All rights reserved. This document is Public. Page 14 of 20 38 of 83 Lab – Basic System Preferences in macOS

Step 10: CDs & DVDs Preferences The CDs & DVDs pane only appears if you have an optical drive for your Mac. This does not need to be a built-in drive, but just one that is attached to and recognized by your system. (Remote Disc does not count.)

a. The three menus are all broadly similar, enabling you to set a default action when certain types of optical media are discovered by your Mac (the insertion of a CD, a picture CD, or a video DVD). You can define a specific application or script to run, or tell your Mac to do nothing by selecting Ignore. If the option is set to Ask what to do, you will get a dialog box on inserting a relevant disc.

Step 11: Display Preferences The options you will see within the Displays pane are in part reliant on your Mac hardware. At a minimum, you will see the Display tab for setting resolutions and the Color tab for setting color profiles. If you have multiple displays, that will add an Arrangement tab. Some displays will also provide an Options tab. a. Within the Display tab, you will see an image representing your display (or the closest Apple equivalent), Resolution options, a Brightness slider, and some other settings that are determined by your hardware set-up. Under Resolution, Default for display sets your display to the most optimal choice. Click Scaled to select from other supported resolutions.

b. The Color tab is something typical users will never need to visit, but if you work with photography and design, you may need to calibrate your display. Unchecking Show profiles for this display only will list some popular profiles you can choose from. Open Profile loads the current profile into the ColorSync Utility app, so you can delve into its details in the ICC file format. Delete Profile deletes any selected custom profile but will not remove those that are preloaded on to your machine.

© 2017 All rights reserved. This document is Public. Page 15 of 20 39 of 83 Lab – Basic System Preferences in macOS

Step 12: Energy Saver Preferences a. The Energy Saver pane is designed to adjust power settings based on user-defined criteria, which can be especially useful when conserving battery power for a notebook. Note: There are variations on this pane depending on the hardware you own. 1) Desktop machines get a single pane with separate sliders for defining how long the Mac should wait before sleeping the computer and display. 2) Other options include: Put hard disks to sleep when possible and Wake for Ethernet network access. 3) Change Computer sleep and Display sleep to Never. You will get a popup stating you will use more energy with these settings. Click OK.

b. The Schedule button provides further control, enabling you to define a start-up/wake time and a sleep time. These can each be set to run daily, only on weekdays, only on weekends, or only on a specific day of the week. c. In all cases, Restore Defaults will revert your Mac's settings to factory defaults.

© 2017 All rights reserved. This document is Public. Page 16 of 20 40 of 83 Lab – Basic System Preferences in macOS

Step 13: Time Machine Files can be lost when your Mac’s internal storage develops a fault, becomes corrupted, or if you accidentally trash a file. The macOS Time Machine feature offers protection against such events by backing up new and modified files once an hour. All you need to provide is an external or second hard drive. It would not help recover files that are created or trashed within that interval but multiple versions of other files on your Mac are preserved, while there is free space available. As space diminishes, the number of old versions is trimmed, but you can always connect a fresh drive. In the long term, it is worth supplementing Time Machine with an off-site backup plan to protect against physical damage or theft of all your hardware. For day-to-day mishaps and even serious faults, Time Machine can quickly get you out of a sticky situation. a. Attach an external or internal drive to your Mac. For this lab, you will use the Time Machine internal drive (found on the desktop).

Note: During the installation process, a dialog asked if you want to setup a drive for backups. You selected Don’t use. b. Open System Preferences and click on the Time Machine icon in the System group.

© 2017 All rights reserved. This document is Public. Page 17 of 20 41 of 83 Lab – Basic System Preferences in macOS

c. Press Select Backup Disk… in Time Machine’s preferences pane to reveal a list of disks on which it can store backups.

d. The list will include a Time Capsule if one is found on the local network. Select your external drive. Optionally, tick the box labeled Encrypt backups for protection at the expense of some speed. Click Use Disk.

e. Back in the main pane, the Back Up Automatically on the left has been checked. Click on Options.

© 2017 All rights reserved. This document is Public. Page 18 of 20 42 of 83 Lab – Basic System Preferences in macOS

f. This opens a list of items you can exclude from backups. Click on Install macOS Sierra and click Save.

g. Back on the main page, check the box to Show Time Machine in menu bar.

© 2017 All rights reserved. This document is Public. Page 19 of 20 43 of 83 Lab – Basic System Preferences in macOS

Reflection

1. Why are system preference in macOS important? ______

2. Where would you go to change the Highlight color? ______

3. What are hot corners? ______

4. What is Mission Control? ______

5. Why would someone wish to change the input language of the operating system? ______

6. What is FileVault? ______

© 2017 All rights reserved. This document is Public. Page 20 of 20 44 of 83

10.4.1.4 Lab - Install Software in macOS

Introduction In this lab, you will install and remove a third party software application supplied by your instructor. You will install the Packet Tracer Windows application.

Required Equipment • A computer with macOS installed • Access to the Internet

Part 1: Installing Software from the App Store a. Open the App Store.

b. Type Dr. Cleaner in the Search bar and press Enter or Return. Note: Enter and Return are interchangeable terms depending on the keyboard. c. Click on Get and Install App. Note: If asked, type in your Apple ID and Password. Note: if asked, click Always Require a password when making purchases. (This app is free)

d. Click on Launchpad in the menu bar.

© 2017 All rights reserved. This document is Public. Page 1 of 7 45 of 83 Lab – Install Software in macOS

e. Double click on Dr. Cleaner to install.

f. Click Continue and then click Allow to install Dr. Cleaner. g. Dr. Cleaner window will open. Click on the MEM icon in the upper taskbar to close.

h. Click on Quit App Store to close the App Store window.

© 2017 All rights reserved. This document is Public. Page 2 of 7 46 of 83 Lab – Install Software in macOS

Part 2: Installing Third-Party Software

Step 1: Download the Software a. Log on to the Mac computer and open the Safari browser.

b. Go to http://netacad.com and login. c. Under the Resources tab, click on Packet Tracer Resources. Download the Packet Tracer xx for Windows 32bit.

d. Download PlayOnMac from http://playonmac.com

Step 2: Install the Software a. Launch PlayOnMac. Note: If you get a security message saying, “PlayOnMac can’t open it because the identity of the developer cannot be confirmed”, go to System Preferences > Security and Privacy > General. Under Allow apps downloaded from: click Open anyway. Click Open on the popup window. b. Install XQuartz and finish the installation process.

Step 3: Using the Software a. Open PlayOnMac b. Click on the Tools menu and select Manage Wine Versions.

© 2017 All rights reserved. This document is Public. Page 3 of 7 47 of 83 Lab – Install Software in macOS

c. Select the latest Wine version and install it.

d. Click on Configure.

e. Click on New and then Next. f. Choose the version on Wine you previously installed and click Next.

© 2017 All rights reserved. This document is Public. Page 4 of 7 48 of 83 Lab – Install Software in macOS

g. Name the virtual drive PacketTracer and click Next.

h. Install any additional software it may ask for. i. Click on the PacketTracer you just created and click on the Miscellaneous tab. j. Click Run a .exe file in this virtual drive.

k. Select the PacketTracer.exe file you previously downloaded and click Open.

© 2017 All rights reserved. This document is Public. Page 5 of 7 49 of 83 Lab – Install Software in macOS

l. Follow the prompts to install Packet Tracer. m. Run Packet Tracer when finished. Take all the defaults. n. You will see a Cisco Packet Tracer.Ink file on the desktop. Delete it. o. Click on the General tab in the PlayOnMac configuration window. p. Click on Make a new shortcut from this virtual drive. q. Click on the PacketTracer.exe link and click Next.

r. Leave the default name and click Next. A new PacketTracer icon will appear on the desktop. s. Open the Applications folder and drag the PacketTracer icon on the desktop into it. t. Close all open windows.

© 2017 All rights reserved. This document is Public. Page 6 of 7 50 of 83 Lab – Install Software in macOS

Reflection

1. What is different between the Microsoft and Mac install process? ______

2. What is the purpose of PlayOnMac? ______

© 2017 All rights reserved. This document is Public. Page 7 of 7 51 of 83

10.4.1.5 Lab – Common System Utilities in macOS

Introduction Tucked away in the Mac Applications Folder is another folder, the Utilities folder. The programs in the Utilities folder help you fine tune, troubleshoot, and configure your Mac system. Some of the programs you will likely never use but it is good to know they are there in case you run into problems with your system.

Recommended Equipment • A computer running macOS

Part 1: System Utilities

Step 1: Open the Utilities Folder a. The Utilities folder can be accessed by opening Applications > Utilities.

Step 2: The macOS System Information is exactly the same as the Windows System Information. System Information is a great troubleshooting tool and one in which you should become familiar. When you run System Information it takes a snapshot of your entire Mac. It will capture information about your Mac hardware, your Network setup, and the installed Applications on your machine. It is most useful when you need to call Apple about a problem with your system because you can export this snapshot and send it to them.

© 2017 All rights reserved. This document is Public. Page 1 of 8 52 of 83 Lab – Common System Utilities in macOS

Step 3: Activity Monitor Occasionally in macOS, it may be necessary to force a program or process to quit. For example, if a particular program fails to respond or unexpectedly hangs. Every application on a Mac comprises of one or more processes. It is usually possible to use the Force Quit command ( esc) in the Apple Menu, but only individual applications are listed in the Force Quit Applications window rather than all processes that are running on your computer. ⌘⌥ The Activity Monitor is a graphical tool that allows you to manage processes and look at the various things that are going on your Mac in real time. It shows common process-related details such as the memory used and percentage of CPU that each process is consuming. You can also monitor programs that are accessing your disk drives, or your network. Each application on your Mac has an associated Process ID (a PID) and a user-friendly name. From here, you can inspect or quit each process, but in this example, we use Activity Monitor simply as a companion to Terminal. Note: The process ID is assigned by macOS, and therefore will not be the same on every computer.

a. Double click on a process to open a window to show its usage statistics and to quit the process.

© 2017 All rights reserved. This document is Public. Page 2 of 8 53 of 83 Lab – Common System Utilities in macOS

Step 4: Disk Utility Disk Utility is a general-purpose disk management application. With Disk Utility you can repair hard drives, erase disks, partition disks, manage disk image files (DMG). If you have a server you can also manage RAID sets. These tasks include: • The creation, conversion, compression and encryption of disk images from a wide range of formats read by Disk Utility to .dmg or .cdr, which is identical to the .iso format • Mounting, unmounting, and ejecting disks (including both hard disks, removable media and disk images) • Enabling or disabling journaling • Verifying a disk's integrity, and repairing it if the disk is damaged • Verifying and repairing permissions • Disk erasing, formatting and partitioning • Secure deletion of free space or disk using a 35-pass Gutmann algorithm • Adding or changing partition table between Apple Partition Table and GUID Partition Table • Creating, destroying, and repairing RAID sets • Restoring volumes from scanned for ASR images • Burning disk images to CD or DVD in HFS+ format • Erasing CD-RWs and DVD-RWs • Checking the S.M.A.R.T status of a hard disk

a. Run a check on the Macintosh HD by clicking on Macintosh HS on the left and selecting First Aid from the top menu. Click Run then Continue on the pop up.

Note: This is the same as running CheckDisk on a hard drive in Windows.

© 2017 All rights reserved. This document is Public. Page 3 of 8 54 of 83 Lab – Common System Utilities in macOS

Step 5: Console The Console is an awesome utility for troubleshooting your Mac. It rolls up all of the system logs and presents them in an easily accessible form. This is similar to the Event Viewer in Windows.

Step 6: The Digital Color Meter is a utility that lets you display the color value of any pixel on your screen. It is useful if you are doing graphics design work and need to match a color with something on the screen.

Step 7: Grab lets you take screen shots of your Mac desktop or applications and save them in various formats. a. Double click on Grab. On the Capture menu select Selection then select all the icons in the Utilities window. The captured window will appear. b. Go to File > Save. Save as a PNG file named Icons to the Desktop. Click Save.

© 2017 All rights reserved. This document is Public. Page 4 of 8 55 of 83 Lab – Common System Utilities in macOS

Step 8: Using If you are using your Mac for scientific work or are a student check out Grapher. Grapher is a data visualization tool built into Mac OS X. With Grapher you can input equations and visualize the results. After you have created your graph, you can play around with the appearance of the graph and create animations that you can share with others.

Step 9: Using Access Your keychain is where OS X stores various system and website passwords. If you use a program that requires a password, you often are prompted if you want to save it into your Keychain. This program allows you to manage your keychain. If you want to change or remove any of the passwords in your keychain use Keychain Access.

Step 10: Migration Assistant If you purchase a new Mac and want to transfer the contents of your old Mac onto your new Mac you run the Migration Assistant. The Migration Assistant will make a mirror of your old Mac. It preserves your settings, preferences, applications and brings over all of your documents.

© 2017 All rights reserved. This document is Public. Page 5 of 8 56 of 83 Lab – Common System Utilities in macOS

Step 11: Terminal Terminal is your window in to the wonderful world of UNIX. Terminal allows you to access all of the great UNIX commands that are installed into OS X. You will be using Terminal for Lab 10.4.1.7.

Step 12: Using VoiceOver Utility The Mac is an accessible operating system. This means that out of the box it is designed so that someone with limited vision can still use the system. It does this with VoiceOver. VoiceOver will enable your Mac to speak to you. Someone with limited vision can use it to read email, highlight and read sentences, read aloud the web. This utility will allow you to setup how VoiceOver should behave.

Step 13: Using X11 The Mac OS X operating system is based on UNIX (if you have heard of LINUX this is his big brother). Because of this, it can run many applications originally written for UNIX. The X Windows System is the graphical user interface (UI) used by UNIX for their desktop interface and GUI programs. In order to run X programs you need an X Windows System. The X11 Utility provides the environment for you to run X Windows programs on your Mac. Most people will not need this and in fact it is not installed by default. If you need to run an X Windows application and this program is not available, you can find it as an optional install on your OS X installation disc.

Step 14: Other Utilities Several other utilities are available but are not used in the virtual environment including: AirPort Utility, Audio MIDO Setup, Bluetooth File Exchange, Assistant, ColorSync Utility, Script Editor, and XQuartz. You can do a search to find out more.

Part 2: Using Network Utility was removed from the Utilities folder in this version of macOS. To find it, do a spot light search for it, double click or hold the command key to reveal the path Network Utility is a Swiss army knife tool for testing your network connections. If you think something is going wrong with your network, start by looking here. You can view the following information for each network connection from the Info tab: • hardware address of the interface • the current IP addresses assigned to the interface • hardware speed and status (active or inactive) • the name of the interface manufacturer and model (such as for an add-on PCI card in a Mac Pro or a connected USB to Ethernet adapter) • a count of data packets sent and received over the interface • a count of transmission errors and collisions on a connection

© 2017 All rights reserved. This document is Public. Page 6 of 8 57 of 83 Lab – Common System Utilities in macOS

Network Utility also provides graphic user interface (GUI) methods for common command- line diagnostic tools. a. Click on Netstat. Select Display routing table information and click Trace. What information was revealed? ______b. Click on Ping. Type in cisco.com and click Ping.

What was the TTL and time for the fifth packet? ______c. Click on Lookup. Type in cisco.com and click Lookup. What is the IP address for this URL? ______d. Click on Traceroute. Type in cisco.com and click Trace. How many hops did it take to reach this URL? ______e. Click on Whois. Type in cisco.com and click Whois. What are the Name Server addresses for this domain? ______f. Click on Finger. Type in Your Email address and click Finger. What information did it reveal? ______g. Click on Port Scan. Type in this real machine’s IP address (found in the Info tab) and test ports between 0 – 1024, then click Scan. What open ports did the scan reveal? ______To learn more about each of these tools and their uses, open Network Utility and select Network Utility Help from the Help menu. You can use this information, together with network information provided by the Network pane of System preferences, to investigate your network connection.

© 2017 All rights reserved. This document is Public. Page 7 of 8 58 of 83 Lab – Common System Utilities in macOS

Reflection

1. Why would it be beneficial to use the Network Utility? ______

2. What are the benefits of Activity Monitor? ______

3. How could you use the Digital Color Meter? ______

4. How could you use the Grapher? ______

5. What information is stored in Keychain Access? ______

© 2017 All rights reserved. This document is Public. Page 8 of 8 59 of 83

10.4.1.6 Lab - Task Scheduler in macOS

Introduction If you have been manually performing a task on your Mac over and over, you can automate it with Automator and use iCal to schedule when you want the task to run. Apple includes a copy of Automator on the macOS. The Automator library comes with a variety of actions to help you automate tasks to work with documents, files and folders, email, music, images and more. All new Macs also come with iCal, Apple’s application for scheduling tasks in a calendar.

Recommended Equipment • A computer running macOS

Part 1: Automator

Step 1: Begin Automator a. Open Applications and click Automator to launch Apple’s native program for automating tasks. b. The Automator window appears. Double click Application to create a new empty Automator application window. A list of actions appears in the library in the left pane of the Automator window.

© 2017 All rights reserved. This document is Public. Page 1 of 5 60 of 83 Lab – Task Scheduler in macOS

Step 2: Create a Task a. Click on Utilities in the right menu and drag the action Launch Application from the Automator library into the main Automator window. b. Click the arrows and select Other… from the list. Click on Applications > Utility, Disk Utility.

c. Click on Utilities in the right menu and drag the action Watch Me Do from the Automator library into the main Automator window. d. Click on the Record button in the top right. e. You will be asked to grant access to this application. Click Open System Preferences. f. Click the Lock icon in the bottom Left to make changes. Enter your password when prompted. 1) Check the Automator. 2) Click the Lock to prevent further changes. 3) Close the Security & Privacy Window.

Step 3: Record a Task a. Open Disk Utility. b. Click on the Record button in the top right. The Automator window will disappear so you can see the Disk Utility window. c. Click one time on Macintosh HD > First Aid > Run > Continue. d. Click on Stop Recording. The Watch Me Do window should look like this:

© 2017 All rights reserved. This document is Public. Page 2 of 5 61 of 83 Lab – Task Scheduler in macOS

Step 4: Run the Task a. Click on the Run button in the upper Left. (This will take a few minutes to run) b. Does the task run First Aid correctly? ______c. If not, use the Log at the bottom to troubleshoot and re-record the task if needed.

Step 5: Save the Automator Task a. Click File from the Automator menu, click Save. b. Type the name First Aid in Save As: and save it to the Desktop.

c. This icon should appear on the Desktop.

d. Close all open windows.

© 2017 All rights reserved. This document is Public. Page 3 of 5 62 of 83 Lab – Task Scheduler in macOS

Part 2: Add Automator Action to iCal a. Open Applications and click Calendar to launch Apple’s native calendar application. b. Double click on today’s date to select it. A new event window appears on the date you selected. c. Name the event Run First Aid. d. Click on the Date to expand it. e. Set the Start Time to 11:45pm. Leave the End time as is. f. Next to Repeat, click to set the scheduling option to Every Month. g. Click Alarm and then click Custom. h. Set the top box to Open File. i. In the second box click Other and click Desktop from the Left and select First Aid. j. Click Select at the bottom. k. Set to run at At Time of event. l. Click OK. The Automator task you selected will now run according to the schedule that you designated in iCal.

© 2017 All rights reserved. This document is Public. Page 4 of 5 63 of 83 Lab – Task Scheduler in macOS

Reflection

1. What other tasks would be useful to run in Task Scheduler? ______

© 2017 All rights reserved. This document is Public. Page 5 of 5 64 of 83

10.4.1.7 Lab - Terminal Commands in macOS

Introduction In this lab, you will use the Terminal app to input CLI commands to manage files and folders in macOS.

Recommended Equipment • A computer running macOS

Part 1: Terminal Basics

Step 1: Anatomy of the Console. • Console: This is the system as a whole. This is both the command line as well as the output from previous commands. • Command Line: This is the actual line in a console where you type your command. • Prompt: This is the beginning of the command line. It usually provides some contextual information like who you are, where you are and other useful info. It typically ends in a $. After the prompt is where you will be typing commands. • Terminal: This is the actual interface to the console. The program we use to interact with the console is actually a “ emulator”, providing us the experience of typing into an old school terminal from the convenience of our modern graphical operating system.

Step 2: Parts of a command Nearly all commands follow a common pattern with three main parts. The program, the options, and the arguments. Here is an example:

• The Program is like the verb. It describes what you want to do. In our example ls is the program. ls is short for list, meaning, I want to see a list of files somewhere on my computer. • The Options are like the adverb. They usually modify the way the program will run. In this example -la are options. The -l is short for “long” and will display the file names along with more detailed information. The a will include all hidden files. Without these options, the list will be simply the filenames. Options are just that: Optional. Any command should have some default behavior when used without options. Each command has it’s own options. Most often, the order of the options do not matter, but occasionally they may.

© 2017 All rights reserved. This document is Public. Page 1 of 19 65 of 83 Lab – Terminal Commands in macOS

• The Arguments are like the objects. They describe what we want our command to act on. In this example ~ is an argument. The ~ is a shorthand name for a special folder on your computer: your home folder. So we are saying we want to list all of our files in our home folder. Some programs may not need arguments. For instance, without arguments, ls will list the files in the directory you are currently in. Again, each program has different arguments but the order of the arguments typically matter.

Step 3: Access the Terminal a. Open the terminal. Click on Finder > Applications folder > Utilities folder > Terminal. Note: You may want to add this to your by right clicking on Terminal > More > Pin to Taskbar. Note: You can launch Terminal by using Spotlight search and searching for Terminal. Note: Terminal can also be accessed through the Go menu.

Step 4: Running a Command. a. Type the code below and hit Enter. ls Note: Sometimes you might see the code written with the leading $. Do not type the leading $. This is a common convention used is denote what follows is a command to be run.

This show just the name of the folders in this directory.

© 2017 All rights reserved. This document is Public. Page 2 of 19 66 of 83 Lab – Terminal Commands in macOS

b. Type the code below and hit Enter. ls -l

c. This show the folder names, owner, creation date, size, and attributes of each folder. d. Type the code below and hit Enter. ls –la

e. This show the folder names and hidden folders (the ones that start with the dot) along with the owner, creation date, size, and attributes of each folder. f. Type the code below and hit Enter. ls –la ~

g. Why does the output of ls –la and ls –la ~ look the same? ______

© 2017 All rights reserved. This document is Public. Page 3 of 19 67 of 83 Lab – Terminal Commands in macOS

Step 5: Finding Your Location a. In the console, you are always working in a directory or folder on your computer. This is your working directory. You can see where you are using pwd (short for print working directory). Type the code below and hit Enter. pwd This command will print out your current location.

Step 6: Changing Directories a. You can change your directory with cd (short for change directory). If you pass it an argument, it will change your to that location, if it exists. Without an argument, it will take you to your home directory (~). Type the code below and hit Enter. cd Documents

b. You are now in a directory named Documents, because I was in my home directory that contains a directory called Documents. This is a relative path, because I specified my destination relative to my current directory. I can provide an absolute path by providing the full path beginning with the /, or starting with my home directory (~) such as: cd /Users/student/Documents Or cd ~/Documents

© 2017 All rights reserved. This document is Public. Page 4 of 19 68 of 83 Lab – Terminal Commands in macOS

c. Type the code below and hit Enter. ls –l How many items are listed? ______There should not be any listed since this is a new installation. d. Type the code below and hit Enter. ls –l ~ How many items are listed? ______What is different? ______What does the ~ do? ______e. If you want to navigate “up”, that is to the directory that contains your current directory, you can use the special name .. Note: You can even use it, in conjunction with slashes to navigate several levels up. From my Documents directory, this command will take me up to my home directory. cd ..

Step 7: Using Help and the Command Manual Even when you learn what commands you can use, there is still a lot of power in each command or program. There are often dozens of available options, and depending on your arguments, your command could behave in several different ways. a. Help is available on most commands using the –h option. Type in the command as shown. ping –h

You can see all the options available for this command as well as the syntax needed.

© 2017 All rights reserved. This document is Public. Page 5 of 19 69 of 83 Lab – Terminal Commands in macOS

b. Most commands also have a manual. To read, use the man command. Use the name of the command you want to learn about as it’s only argument. For instance to learn more about ls, type the code below and hit Enter. man ls

c. The manual can be scrolled with the arrow keys or space bar. Press q to quit viewing the command. d. Want to know more about the manual? Run man man e. Another useful command is apropos. Enter apropos followed by the command name for a description of that command and its options. f. There are many different commands you can use. Press and hold the ESC key for a few seconds. How many command possibilities are there? ______g. Since there are so many, let’s use the man command to learn about a few of the most commonly used commands. Type man followed by the command name as shown. man mkdir

© 2017 All rights reserved. This document is Public. Page 6 of 19 70 of 83 Lab – Terminal Commands in macOS

h. Using the information displayed by the man command, explain the function of the following commands: Note: Press q to quit viewing the command.

Command Function or Description

mkdir

touch

cp

mv

rm

less

apropos

find

sudo

open

top

ps

kill

chmod

chown

ifconfig

cat

© 2017 All rights reserved. This document is Public. Page 7 of 19 71 of 83 Lab – Terminal Commands in macOS

Step 8: Display all the apps you have installed on the computer a. Type the code below and hit Enter. sudo find / -iname *.app Enter your password

There is an extensive list and these are just the apps installed by default during installation.

Step 9: Show Hidden Files in Finder a. By default, the Finder in macOS hides some files away from view. Open the Macintosh HD. You can only see four folders.

b. To see everything on your computer, enter in the following command: defaults write com.apple.finder AppleShowAllFiles YES killall Finder Note: Substitute NO for YES to hide them again.

© 2017 All rights reserved. This document is Public. Page 8 of 19 72 of 83 Lab – Terminal Commands in macOS

c. Look at the contents of the Macintosh HD now.

d. Notice all the hidden files and folders are grayed out. Now rehide the files and folders on your computer. Enter in the following command: defaults write com.apple.finder AppleShowAllFiles NO killall Finder

Step 10: Creating and Moving files a. Open the Documents folder and right click to create a new folder named Test. b. Open TextEdit in the Applications folder. c. Create a file named TestFile and save it to the folder called Test inside Documents in your Home Directory. d. In Terminal, type cd Documents/Test to navigate to the Test directory. e. Type pwd to check your location. f. Type ls display the contents of the directory. You should see the result 'TestFile.rtf.'

g. You can make a copy of the file using the cp command. Type cp TestFile.rtf TestFile-copy.rtf and check the result with the ls command.

© 2017 All rights reserved. This document is Public. Page 9 of 19 73 of 83 Lab – Terminal Commands in macOS

h. Type cd then drag your Documents folder onto the Terminal window and press Enter. That will place you in the Documents folder in your Home Directory. i. Now type mkdir Test2 to make a new directory called Test2. j. To move the file TestFile-copy.rtf to the Test2 directory, type the following command: mv ~/Documents/Test/TestFile-copy.rtf ~/Documents /Test2/TestFile-copy.rtf Note: You can also use the mv command to rename files. To rename a file without moving it, just remove the second directory from the command. k. Open Documents and check that TestFile-copy.rtf is gone from the Test folder and appears in the Test2 folder. l. Remove the TestFile.rtf by typing the following command: rm -i ~/Documents/Test2/TestFile-copy.rtf Note: When deleting files, it is a good practice to add a confirmation step. Put -i immediately before the file name. Without the -i, the file will delete without asking for confirmation. m. Check the results.

© 2017 All rights reserved. This document is Public. Page 10 of 19 74 of 83 Lab – Terminal Commands in macOS

Step 11: Alter file permissions File permissions control which users can access and modify files and folders on your Mac. You can set permissions on any file or folder on your computer, and there are three different modes: read, write, and execute. You can check file permission by right clicking a file and selecting Get Info. Look for the Sharing & Permissions section.

Note: You can check the file permission in Terminal by using the ls –l command. Folder and file permission look like this:

The folder permissions are drwxr-xr-x and the file permissions are -rw-r—r--@. The first item “d” in these permissions indicates it is a directory rather than a file. The subsequent 9 items are split into three flags (read, write and execute) for Users, Groups, and Others and can take the values “r” (read), “w” (write), “x” (execute) or “–” (unset). The @ on the file indicates it is set with an extended attribute. There are two Terminal commands we can use to change permissions; chmod, which modifies permissions for all users except the file's owner and chown, which assigns ownership to a specific user.

© 2017 All rights reserved. This document is Public. Page 11 of 19 75 of 83 Lab – Terminal Commands in macOS

a. You will use modes to change permissions.

Modes An absolute mode is an octal number constructed from the sum of one or more of the following values: 400 Allow read by owner. 200 Allow write by owner. For files, allow execution by owner. For directories, allow the owner to 100 search in the directory. 040 Allow read by group members. 020 Allow write by group members. For files, allow execution by group members. For directories, allow 010 group members to search in the directory. 004 Allow read by others. 002 Allow write by others. For files, allow execution by others. For directories, allow others to 001 search in the directory. b. Navigate to the Test folder in your Documents folder c. Use ls –l to show the items in the Test folder.

Note: There are seven hidden items not listed. d. To change permissions on a file to allow anyone to access, read, and modify the file, enter in the following command: sudo chmod 777 ~/Documents/Test/TestFile.rtf Enter your password e. Show the permissions again.

Note: Users, Groups, and Others all have Read, Write, and Execute permission. f. To change ownership of a file to your account, type the following command: sudo chown student ~/Documents/Test/TestFile.rtf

© 2017 All rights reserved. This document is Public. Page 12 of 19 76 of 83 Lab – Terminal Commands in macOS

Step 12: View All Processes and Terminate Each application on your Mac has an associated Process ID (a PID) and a user-friendly name. Note: The process ID’s are assigned by Mac OS, and therefore will not be the same on your every computer. a. Type ps -ax to list every process running, along with additional details such as the PID, the elapsed time running, and the process name and location (shown in the CMD column) b. Once you know the process ID, killing it using Terminal is very simple. Be cautious however because forcing a process to suddenly exit can have unforeseen consequences, so it is advisable to check carefully that the process you are about to kill is the correct one. There are essentially two easy ways to kill a process: 1) By PID: the simplest way is with the kill command followed by the PID, which causes the selected process to terminate immediately. In the Sky example, kill 14530 does the job and causes the process to exit immediately 2) By name: this method uses the killall command to kill all the processes that contain that name. For example killall Skype will terminate all the processes that have Skype in their name Caution: killall should be used sparingly to avoid accidentally terminating the wrong processes. There is no confirmation prompt to ask if you really do wish to kill the processes, so check carefully beforehand.

Step 13: top a. Top is another classic utility that has long been in use by the Linux/Unix community. To use top, open a Terminal.app and type top. In less time it takes to blink you eye you should be presented with a window full of text. What you see is a list of every process currently running on your Macintosh. When my Mac is running slow, top is the first resource I use to figure out what is going on.

Step 14: softwareupdate a. The softwareupdate command is a quick and easy way to install software updates from apple. To use it, open up Terminal.app and type softwareupdate -i -a to install all available updates for your Macintosh. If you wish to only install “recommended” updates type softwareupdate -i -r.

Step 15: ifconfig a. The quickest, easiest way to figure out what IP address your Mac is using is ifconfig. To use ifconfig, open up Terminal.app, and type ifconfig. You will see a lot of information, including your network card’s MAC Address. I like to type ifconfig | grep inet to return just the IP information for my computer. You can disable a network interface (in this example “en0”) by typing ifconfig en0 down. You could bring back up with ifconfig en0 up. This can be much quicker than using the System Preferences window.

© 2017 All rights reserved. This document is Public. Page 13 of 19 77 of 83 Lab – Terminal Commands in macOS

Part 2: Install Homebrew and m-cli Terminal commands are rarely intuitive. For example, if you want to add a recent items folder to your dock, this is the command: defaults write com.apple.dock persistent-others -array-add '{ "tile-data" = {"list-type" = 1; }; "tile-type" = "recents-tile";}' && \killall Dock Stare at this long enough and you can kind of figure out what it all means, but it is hard to imagine many users discovering it on their own. A free program called m-cli bills itself a Swiss Army Knife for macOS, and it makes a lot of these hidden commands a lot easier to learn and discover. With m-cli installed, the command is much easier: m dock addrecentitems

Step 1: Install Homebrew and Homebrew Cask Homebrew is going to be easier for you, however, and will also help keep everything up-to- date easily. (Not to mention it has a bunch of other useful tools.) a. First, you will need the command-line tools for Xcode installed. You can install this just by running the following command in a Terminal window. You could also install the full Xcode application from Apple, but that takes up more space on your Mac and is not necessary. xcode-select --install

b. Next, install Homebrew. You can just open a Terminal window, type the following command, and press Enter: ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/in stall)"

© 2017 All rights reserved. This document is Public. Page 14 of 19 78 of 83 Lab – Terminal Commands in macOS

c. This script informs you what it will do. Press Enter and then provide your password to install it. By default, it installs Homebrew so you can use the brew command without typing the sudo command and providing your password.

d. Run the following command once you’re done to ensure Homebrew is installed and working properly: brew doctor

e. Once you are done, run the following command to install Homebrew Cask. It uses Homebrew to install Cask: brew install caskroom/cask/brew-cask

Step 2: Installing m-cli in macOS a. Once you have Homebrew set up, open the Terminal (Applications > Utilities > Terminal), then run the following command: brew install m-cli

© 2017 All rights reserved. This document is Public. Page 15 of 19 79 of 83 Lab – Terminal Commands in macOS

Step 3: How to Use m-cli The number of functions m-cli offers can be intimidating, but it is ultimately quite simple. Most commands are just three words: m, followed by a two word command. a. To get started, type m help. This will give you a list of commands and functions. Each of these commands can trigger at least one functionality.

b. To find them, type m subcommand help. For example, type: m dock help

As you can see, dock offers several tweaks (autohide, magnification, position).

© 2017 All rights reserved. This document is Public. Page 16 of 19 80 of 83 Lab – Terminal Commands in macOS

c. To learn a bit more, here is a look at the bluetooth command.

As you can see, I can quickly turn Bluetooth on and off, and check the current status. d. Finally, here’s the wifi command:

As you can see, I can turn the Wi-Fi on and offer, but also recover passwords for any network or scan all networks that are nearby.

© 2017 All rights reserved. This document is Public. Page 17 of 19 81 of 83 Lab – Terminal Commands in macOS

Step 4: Everything m-cli Offers There are 30 commands, all of which offer at least one sub-command. Here is a quick outline of what all of these commands can do: • battery: See current battery status. • bluetooth: See current Bluetooth status, turn Bluetooth on and off. • dir: View trees of folders, quickly delete empty folders. • disk: See information about connected drives, format drives, repair permissions. • dns: Flush your DNS cache. • dock: Change your Dock’s settings, or add a recent items folder. • finder: Toggle hidden files, extensions, and the desktop. • firewall: Disable or enable the macOS firewall. • : Disable or enable Gatekeeper. • group: View or change groups of users on your Mac. • hostname: View or change your Mac’s hostname • info: See what version of macOS you’re running. • lock: Lock your Mac. • network: See or change your current location. • nosleep: Stop your Mac from going to sleep, for a set number of seconds or until a particular command finishes. • ntp: Toggle whether your Mac syncs its clock with a time server. • restart: Tell your Mac to restart. • safeboot: Tell your Mac to restart in Safe Boot. • screensaver: Start the current default screensaver. • service: See and monitor all currently running services. • shutdown: Tell your Mac to shut down. • sleep: Tell your Mac to go to sleep. • timezone: Change your Mac’s timezone. • trash: Empty your Mac’s Trash folder. • update: Update software without launching the App Store • user: Manage users on your Mac. • volume: Change the volume on your Mac. • vpn: Manage VPN connections. • wallpaper: Set your Mac’s wallpaper. • wifi: Turn Wi-Fi on and off, retrieve your current Wi-Fi password, or scan all nearby networks.

© 2017 All rights reserved. This document is Public. Page 18 of 19 82 of 83 Lab – Terminal Commands in macOS

Reflection

1. What are the advantages of using CLI vs. GUI? ______

2. What is the purpose of Homebrew? ______

3. What is the purpose of m-cli? ______

© 2017 All rights reserved. This document is Public. Page 19 of 19 83 of 83