macOS tools

macOS has the tools you know, under other names

THE JOBON A MACBrowse files and foldersFinderFind anything by typingSpotlightClose an app that has frozenForce QuitEncrypt the whole driveFileVaultBack up every hour, automaticallyTime MachinemacOS has the tools you know from Windows, under other names.Finder is File Explorer. FileVault is BitLocker. Force Quit does what End task does, andopens with Option, Command and Escape. System Settings is the Mac's Control Panel.

Finder, Spotlight, Force Quit, FileVault, Time Machine.

macOS tools · Going deeper

macOS features

FeatureWhat it isDockThe row of app icons at the edge of the screenMission ControlShows every open window at onceMultiple desktopsSeveral screens of windows to switch betweenKeychainStores passwords and certificatesiCloudApple's cloud: iMessage, FaceTime and iCloud DriveContinuityStart on one Apple device and carry on with anotherGesturesTrackpad swipes and pinchesDisk UtilityPartitions, formats and repairs drivesTerminalThe command lineTime MachineBackups to an external or network driveSystem SettingsDisplays, Network, Printers and Scanners, Privacy, AccessibilityAn Apple ID signs the user in to iCloud and the App Store.Companies restrict it with device management, so work data stays out of personal accounts.

Mission Control, Keychain, iCloud, Disk Utility.

Mac applications

Three kinds of installer lead to one folder

.dmga disk image: open it, drag the app out.pkgan installer that runs the stepsApp Storedownloads and installs in one click/Applicationseach program isone .app itemdragTrashuninstalled, unless itcame with an uninstallerThree kinds of installer lead to one folder, and removal is a drag to the Trash.An .app looks like a single file but is a folder holding the whole program. Softwareinstalled from a .pkg may add files elsewhere, so use its own uninstaller when it has one.

.dmg, .pkg or App Store, into /Applications.

Mac applications · Going deeper

System folders and best practices

FolderHolds/ApplicationsPrograms for every user/UsersOne home folder per person/LibrarySettings and support files shared by all users/SystemmacOS itself; protected, leave it alone/Users/name/LibraryOne person's own settings and app dataBest practiceOn a MacBackupsTime Machine, to a drive that is not the Mac's ownUpdates and patchesSoftware Update; turn on automatic updatesRapid Security ResponseA small urgent security fix, delivered between normal updatesAntivirusMacs get malware too; built-in protection plus the company's toolAn app that misbehaves for one user only: look in that user's Library folder.

/Library, /System, Rapid Security Response.

Check yourself

Macone app shows a spinning wheel and ignores clicksOther appsstill respondWorkopen and unsaved in those other apps

What should the user do first?

Linux permissions

Each digit is read 4, write 2 and run 1, added together

chmod 754 backup.shOwner7rread 4wwrite 2xrun 14 + 2 + 1 = 7Group5rread 4-no writexrun 14 + 1 = 5Everyone else4rread 4-no write-no run4 = 4Each digit of a mode is read 4, write 2 and run 1, added together.Three digits: the owner, the group, and everyone else. So 754 is rwx r-x r--:the owner can do everything, the group can read and run, and others can only read.

754 is rwx r-x r--.

Linux permissions · Going deeper

File commands

CommandWhat it doesExamplelsLists filesls -l shows permissions and ownerpwdPrints the folder you are inmvMoves or renamesmv old.txt new.txtcpCopiescp -r for a folderrmDeletes: there is no recycle binrm -r for a folderchmodChanges permissionschmod 754 backup.shchownChanges the ownerchown ana report.txtgrepFinds text inside filesgrep error app.logfindFinds files by name, size or datefind /home -name "*.pdf"catPrints a file to the screencat /etc/hostsnanoA simple text editornano notes.txtmanThe manual for any commandman chmodLinux names are case sensitive: Report.txt and report.txt are two files.

ls -l, chown, grep, find.

Root and sudo

Root can do anything, so borrow it one command at a time

sudo apt install htopanaan ordinaryuser accountsudoasks for ana'sown passwordrootthat one commandruns with full poweranaback to ordinary,straight awayLogwho ran whatis recordedRoot can do anything, so borrow it for one command at a time.That is what sudo does. The other way, su, switches you to root until you leave, and everymistake you make there has no safety net. Working signed in as root is the thing to avoid.

sudo for one command. Avoid working as root.

Root and sudo · Going deeper

System, package, network and information commands

CommandWhat it doesExamplesudoRuns one command as rootsudo systemctl restart sshsuSwitches to another user, by default rootsu -aptInstalls software on Debian and Ubuntusudo apt install nginxdnfInstalls software on Fedora and Red Hatsudo dnf install nginxmountAttaches a file system to a foldermount /dev/sdb1 /mntfsckChecks and repairs a file systemrun it unmountedipShows and sets network addressesip addrping, tracerouteDoes it answer; which way does traffic godigAsks DNS about a namedig example.comcurlFetches a web addresscurl -I https://example.comtopLive list of processes, busiest firstpsA snapshot of processesps auxdf, duFree space per disk; space used by a folderdf -h, du -shapt and dnf do the same job on different families of Linux.

apt or dnf. df for free space. top for load.

Check yourself

Filecleanup.sh, mode 644Ownerana, who gets "permission denied" running itWantedana can run it; nobody else gains anything

Which command is needed?

How Linux starts

The bootloader loads the kernel; the kernel starts systemd

FirmwareUEFI tests thehardwareBootloaderGRUB: finds andloads the kernelKernelthe core: talks tothe hardwaresystemdthe first process:starts all the othersServicesnetwork, logins,the desktopThe bootloader loads the kernel, and the kernel starts systemd.Then systemd starts everything else and keeps it running. The command systemctl talks to it:systemctl status, start, stop, restart and enable, followed by the name of a service.

Bootloader, kernel, systemd, then services.

How Linux starts · Going deeper

Configuration files in /etc

FileHolds/etc/passwdThe list of user accounts. Readable by everyone; no passwords in it./etc/shadowThe password hashes. Readable only by root./etc/hostsNames and addresses checked before DNS is asked./etc/fstabWhich file systems to mount at start-up, and where./etc/resolv.confThe DNS servers this computer asks.Linux keeps its settings in plain text files under /etc.So fixing a setting is editing a file: sudo nano /etc/hosts. A wrong line in /etc/fstab canstop the computer starting, so copy the file before you change it.

/etc/passwd, /etc/shadow, /etc/fstab, /etc/resolv.conf.

Check yourself

Linux PCping 9.9.9.9 gets repliesButno website name can be foundSuspectthe list of DNS servers is empty

Which file should be checked?

Lesson complete

You finished “macOS and Linux for the technician”

Answer the questions along the way to see your score here.

Open in a new tab