echo Hello World

Architecture and Interface Fundamentals of macOS

  • Operating System Architecture:

    • macOS (formerly designated as Mac OS X) is a proprietary operating system developed exclusively for Apple Inc. Macintosh computers.
    • It is engineered on a Unix-based architectural foundation.
    • Recent major versions include macOS Monterey.
  • Hardware Interface and Input Peripherals:

    • Mac keyboards feature dedicated keys distinct from standard PC layouts, including the Command key (H\mathscr{H}), Option key (τ\tau), Mission Control shortcut (F3\text{F3}), Spotlight shortcut (F4\text{F4}), and an integrated Touch ID / Power button.
    • The integrated touch-sensitive input surface on Mac laptops is designated as the trackpad, which relies on multi-finger gestures to perform navigation actions rather than traditional visual UI widgets (e.g., vertical scrollbars are hidden by default because scrolling is executed by swiping two fingers up or down the trackpad).

Special keys on a Mac keyboard

  • Desktop Environment and Navigation Components:
    • Menu Bar: Positioned across the very top of the desktop screen. Houses the Apple menu icon on the far left, active application context menus, and status menus/system icons on the far right.
    • Status Menu and Quick Controls: The top-right portion of the menu bar contains status monitors, clock/calendar displays, the Spotlight search icon, Wi-Fi connectivity selectors, and the Control Center icon.
    • Dock: Positioned along the bottom edge of the display by default. Hosts quick-launch shortcut icons for applications, active running processes, minimized application windows, and the Trash icon.
    • Window Manipulation Controls: Located in the top-left corner of each open window:
    • Red button: Closes the active window.
    • Yellow button: Minimizes the active window down into the right-hand portion of the dock.
    • Green button: Maximizes the window to full-screen display mode.

The macOS desktop with a Finder window showing the Applications pane

  • Core System Utilities and User Interface Management:
    • Finder Application: Operates as the central file and directory navigation system (analogous to Windows File Explorer). Used to access documents, folders, local and network drive locations, tag associations, and application bundles.
    • Utilities Folder: Nested within the Applications folder in Finder. Houses administrative and diagnostic tools including Activity Monitor, AirPort Utility, Audio MIDI Setup, Bluetooth File Exchange, ColorSync Utility, Console, Digital Color Meter, Disk Utility, Grapher, Keychain Access, Migration Assistant, Screenshot, Script Editor, System Information, Terminal, and VoiceOver Utility.

Utilities to support a Mac are in the Utilities folder under Applications in the Finder window

  • Launchpad: Provides a visual, full-screen icon tray of all installed software applications (combining functionality seen across the Windows Start menu and Programs and Features applet). Can be accessed via the dock, a trackpad gesture, or a keyboard shortcut. Applications can be uninstalled by pressing and holding the Option key (τ\tau) until icons shake and clicking the "X" badge on the target application icon.
  • Apple Menu: Accessible by clicking the top-left Apple logo. Exposes sleep, logout, system restart, system shutdown, About This Mac (system information), System Preferences, the Mac App Store, recent items lists, and the Force Quit interface (used to terminate unresponsive applications, matching Task Manager end-task routines in Windows).
  • System Preferences: Primary graphical interface for configuring system-level operational parameters, display hardware, user profiles, network settings, and security policies (equivalent to the Windows Settings app).

The System Preferences window is used to customize the macOS interface

  • Control Center: Aggregates quick toggles and hardware sliders into a unified pane accessible from the menu bar, including Wi-Fi, Bluetooth, AirDrop permissions, Focus profiles, Keyboard Brightness, Screen Mirroring, Display brightness, Sound output volume, and media playback.

The Control Center gathers frequently accessed settings into one location

  • Spotlight: Built-in system-wide indexing search tool initiated via keyboard shortcuts (F4\text{F4} or Command + Space) or by clicking the magnifying glass icon in the menu bar.
  • Mission Control and Spaces: Provides an overview of all active running application windows and virtual desktop environments. Each independent virtual desktop screen generated in Mission Control is called a Space. Users can drag open application windows into designated Spaces along the top bar.

Mission Control allows you to create multiple desktops to contain windows

Storage, File Systems, and Ecosystem Integration in macOS

  • File Systems Supported by macOS:

    • APFS (Apple File System): Default modern file system optimized for solid-state storage, supporting space sharing, crash protection, snapshots, and strong encryption.
    • Cross-Platform File Systems: Supports FAT32 and exFAT formats natively for external drive compatibility between Windows, Linux, and macOS platforms.
  • Directory Hierarchy and Structure:

    • Accessed through the Finder menu bar via Go > Computer > Hard Drive (Macintosh HD).
    • Common application and packaging extensions:
    • .dmg: Disk image file, commonly used to distribute software installers as mountable virtual volumes.
    • .pkg: Installer package script file containing installation instructions and component payloads.
    • .app: Application bundle containing executable code, frameworks, and resource assets.
  • Application Deployment and Distribution:

    • The Mac App Store is the primary vetted distribution source for downloading, licensing, installing, and updating application software.
    • Applications downloaded from external trusted websites must be verified to ensure the payload targets macOS rather than Windows executable architectures.
  • Authentication Accounts and Management Frameworks:

    • Local Account: Standard or administrative user account restricted to the local workstation database.
    • Apple ID: Personal authentication account integrating cloud features, synchronization, and software licensing across consumer devices.
    • Active Directory (AD) Network ID: Domain account allowing Mac workstations to bind to enterprise Windows Active Directory environments.
    • Managed Apple ID: Centrally governed accounts provisioned through Apple Business Manager (hosted at business.apple.com). Designed for enterprise domain integrations, enabling system administrators to restrict device settings, push policies, and allocate role privileges. A Managed Apple ID must always take the format of an email address.

Sign in with Apple ID to access your data stored in iCloud

  • Ecosystem Services and Integrated Tools:
    • iCloud and iCloud Drive: Integrated cloud storage and device-sync framework configured during initialization or via System Preferences. Files stored within iCloud Drive sync across linked macOS, iOS, iPadOS devices, and Windows environments running the iCloud client utility.
    • Keychain Access: Integrated credential security manager located at Finder > Applications > Utilities > Keychain Access. Manages cryptographic keys, certificates, saved website credentials, network share passwords, and Wi-Fi security keys.
    • Screen Sharing and Network Services: Built-in protocol configurable via System Preferences > Sharing. Enables file/folder sharing across the local subnet, printer sharing, remote login access, and graphical desktop remote management matching Windows Remote Desktop functionality.
    • Remote Disc: Legacy mechanism allowing a computer without an optical drive to access the CD/DVD optical drive of another Mac over the local area network. Note: Apple retired this feature; it is unsupported on macOS Catalina (10.1510.15) and newer releases.
    • Terminal: Command-line shell interface located in the Utilities folder that executes underlying Unix commands and scripts.

macOS Maintenance, System Recovery, and Troubleshooting

  • Routine Maintenance Best Practices:

    • Empty the Trash on a scheduled basis.
    • Maintain adequate free secondary storage capacity.
    • Systematically verify and audit startup configurations and remove non-essential items from the Login Items list.
    • Periodically restart the computer to clear temporary file caches and release allocated RAM.
    • Uninstall outdated or unneeded application packages.
  • Operating System, App, and Driver Updates:

    • Application updates acquired through the App Store are managed by launching App Store > Updates and selecting individual update triggers.

The Updates window shows recently installed updates and needed updates when available

  • Operating system updates and critical security patches are managed within System Preferences > Software Update.
  • Recommended enterprise practice: Avoid setting core operating system updates to install fully automatically. It is advised to wait several days following an OS update release to verify stability and driver compatibility prior to manual installation.
  • Configurable update preferences in the Software Update Advanced sheet include: "Check for updates", "Download new updates when available", "Install macOS updates", "Install app updates from the App Store", and "Install system data files and security updates".

Manage how automatic updates are handled

  • Peripheral Driver Troubleshooting Sequence: When a connected peripheral (such as a hardware document scanner) malfunctions due to suspected driver corruption, execute a two-step remediation procedure:

    • Step 1: Update macOS (since the operating system packages a massive library of native peripheral drivers, updating the OS frequently repairs driver corruption automatically).

    • Step 2: If the problem persists, download and install the latest proprietary driver package directly from the hardware vendor's official support site.

    • Time Machine Backup Architecture:

  • Time Machine is the native automated incremental backup utility in macOS, capturing personal user data, application configurations, and system-wide OS files.

  • Supported Backup Storage Targets:

    • Locally attached external drives via USB or Thunderbolt.
    • USB solid-state flash drives.
    • Another networked Mac host sharing storage on the local area network.
    • Network-Attached Storage (NAS) appliances supporting Apple file protocols.
  • Retention and Snapshot Policies:

    • Local snapshots generated automatically as local disk space permits.
    • Hourly snapshot backups maintained for the past 24 hours24\text{ hours}.
    • Daily backups maintained for the past 1 month1\text{ month}.
    • Weekly backups preserved for all previous months.
    • Automatic purge: The oldest chronological backup sets are permanently deleted when the target disk reaches maximum storage capacity.
  • Configuration and File Recovery: Configured via System Preferences > Time Machine. Data restoration is initiated by launching Finder > Applications > Time Machine.

Configure Time Machine backups

  • Disk Management and Repair Using Disk Utility:
    • Located in Finder > Applications > Utilities > Disk Utility.
    • Provides volume metrics including volume type (e.g., APFS Startup Snapshot), mount point, system version, capacity, purgeable space, free space, and S.M.A.R.T. status.
    • The First Aid feature scans physical disks, containers, and APFS volumes to identify and repair directory structure errors, disk partition corruption, and file system anomalies.

Manage drives from the Disk Utility app

  • Startup Troubleshooting and Safe Mode Execution:
    • Safe Mode diagnostics prevent third-party startup applications from launching, flushes dynamic kernel caches, and executes automated file system directory checks on the boot volume.
    • Boot Procedure into Safe Mode:
    • Press and hold the power button until startup options appear.
    • Press and hold the Shift key while clicking "Continue in Safe Mode".
    • Safe Mode Verification: Navigate to Apple Menu > About This Mac > System Report > Software; under the System Software Overview pane, verify that "Boot Mode" reads "Safe".
    • Post-boot recovery: If issues do not reproduce in Safe Mode, audit and delete suspected third-party startup and login extension items before restarting into normal operation.

Boot Mode indicates the computer is booted into Safe Mode

  • macOS Recovery Environment:
    • Isolated boot recovery environment used to recover, wipe, reinstall, or repair the system when standard macOS startup fails.
    • Invocation Procedures:
    • Apple Silicon Macs: Press and hold the power button from a powered-off state, select "Options", and click Continue.
    • Intel-based Macs: Power on the system and immediately press and hold Command + R until the Apple logo appears.
    • Integrated Utilities Available in macOS Recovery:
    • Restore From Time Machine Backup: Performs a point-in-time system restoration from external or network Time Machine repositories.
    • Reinstall macOS: Downloads and reinstalls a fresh copy of the active operating system branch over the internet or boot partition.
    • Safari: Launches an active web browser window to consult online Apple Support documentation.
    • Disk Utility: Provides disk partition formatting, erasure, partitioning, and First Aid repair utilities.

Boot into macOS Recovery to reinstall macOS

Questions & Discussion: macOS Support

  • Question: Why is the scrollbar typically hidden from view in macOS?

    • Response: The scrollbar is not needed in macOS because pages and documents can be scrolled natively by placing two fingers on the trackpad and swiping up or down.
  • Question: A scanner connected to your Mac is giving you problems, and you suspect corrupted device drivers. What should you do first? Second?

    • Options considered:
    • a. Download and install drivers from the scanner manufacturer.
    • b. Back up the macOS startup disk using Time Machine.
    • c. Update macOS.
    • d. Uninstall the scanner and install it again.
    • Response:
    • First action: Update macOS (Option c). macOS includes an extensive native repository of device drivers; installing current system updates often replaces damaged drivers automatically.
    • Second action: Download and install the latest proprietary drivers from the scanner manufacturer's support site (Option a) if the operating system update fails to remediate the malfunction.

Fundamentals of Linux Client and Server Distributions

  • Linux Architecture and Philosophy:

    • Linux is a Unix-like operating system kernel created by Linus Torvalds.
    • Pure Linux is strictly the core OS kernel rather than a fully packaged operating system.
    • Distributions (often called flavors) bundle the Linux kernel with user space system tools, package managers, command shells, and graphical user interfaces (e.g., Ubuntu, Red Hat, Debian, Fedora).
    • Modern consumer platforms derived from the Linux kernel include Google's Android operating system and Chrome OS.
    • The underlying source code of basic Linux implementations is open-source and freely distributed.
    • It serves as the predominant operating system across cloud infrastructure, enterprise server clusters (specifically web and mail servers), desktop workstations, mobile hardware, and Internet of Things (IoT) embedded systems.
  • Ubuntu Desktop Overview:

    • Features an intuitive desktop interface with an application dock (Dash), top status bar, Firefox web browser, and an integrated graphical software repository.

Ubuntu Desktop with the Mozilla Firefox browser window open

  • Ubuntu Client Maintenance Operations:
    • Application Management: Software is installed graphically through Ubuntu Software. Users select software listings and click Install (or trigger manually downloaded deb/package files).
    • Software Updates: Managed via the Updates tab inside Ubuntu Software, or through the "Software & Updates" administrative window to alter cadence and server sources.
    • Backup Utilities: Accessed under Apps > Utilities > Backups. The tool enables administrators to schedule automated backup runs, declare storage locations, and include or exclude explicit file trees.
    • Security Suites: Antivirus and anti-malware utilities must maintain an active update schedule to retain heuristic scanning efficacy.

Ubuntu Desktop utilities

  • Linux File Systems:

    • ext4: Fourth extended filesystem; standard high-performance journaling file system for modern Linux distributions.
    • ext3: Legacy predecessor journaling file system.
    • FAT32 and NTFS: Supported natively or via modules to facilitate cross-platform read/write storage access with Windows environments.
  • Command-Line Environment and Ubuntu Server:

    • Ubuntu Server installs without an overhead graphical desktop environment by default, utilizing a terminal interface.
    • The default command interpreter shell is the Bash shell (Bourne Again SHell).
    • A command prompt displayed inside the terminal is formally termed the shell prompt.
    • Shell Prompt Formatting Syntax: Follows the convention username@hostname:directory$, where:
    • $ signifies an unprivileged standard user account session.
    • # designates the elevated superuser/root administrative shell.

The user account, host name, and current directory appear in the shell prompt, along with a # or $ to indicate the root account or other account

  • User Accounts and the Superuser Model:
    • System administrative duties include installing patches/OS updates, maintaining automated backups, managing software packages, provisioning hardware, managing user credentials, resetting passwords, and enforcing system security.
    • The Root Account: The primary master administrative account possessing unrestricted permissions across all operating system binaries, kernel subsystems, and devices.
    • When authenticated under the root account, the administrator is designated as the superuser.
    • Command Elevation and Switching:
    • su: Switch user command. Used to switch context to another user profile or root.
    • sudo: Superuser Do. Allows an authorized user to execute specific administrative commands with root privilege without logging permanently into the root account.
    • Command to drop into a root terminal shell: sudo su root (prompts for the invoking user's account password, switching the prompt indicator from $ to #).

Linux System Administration, Permissions, and Network Services

  • Terminal Command Navigation Tips:

    • Command History: Pressing the Up-Arrow key retrieves previously entered shell commands.
    • Wildcard Characters:
    • *: Matches zero or more arbitrary characters.
    • ?: Matches exactly one arbitrary character.
    • []: Represents a character-set range (matches any single character enclosed within the brackets).
    • Standard Output Redirection: The > operator directs standard output from screen display to a target file (e.g., command > file.txt).
    • Paging Output: Piping output using | more pauses command results screen by screen (e.g., cat longfile.txt | more).
    • Process Interruption: The keystroke shortcut Ctrl + C immediately breaks out of an active hanging foreground process or loops.
  • Command-Line Text Editing with GNU nano:

    • A lightweight text editor accessible directly inside the terminal via the nano command (e.g., nano mymemo).
    • Common navigation commands displayed along the bottom edge of the screen include:
    • ^G (Ctrl + G): Get Help.
    • ^O (Ctrl + O): Write Out (save buffer contents to file).
    • ^W (Ctrl + W): Where Is (search text pattern).
    • ^K (Ctrl + K): Cut Text.
    • ^J (Ctrl + J): Justify.
    • ^C (Ctrl + C): Current Position.
    • M-U (Alt + U): Undo.
    • ^X (Ctrl + X): Exit nano.
    • ^R (Ctrl + R): Read File.
    • ^ / ^: Replace.
    • ^U (Ctrl + U): Paste Text.
    • ^T (Ctrl + T): To Spell.
    • ^_ (Ctrl + _): Go To Line.
    • M-E (Alt + E): Redo.

The nano text editor with commands displayed at bottom of screen

  • Advanced Package Management and Server Upgrades:

    • Refresh package indexes from online repositories: sudo apt-get update
    • Upgrade all installed packages to their newest available version: sudo apt-get upgrade
    • Ensure the distribution release management program is present: sudo apt-get install update-manager-core
    • Upgrade an entire Ubuntu Server deployment to the next major operating system release: sudo do-release-upgrade
  • File Permissions and Ownership Management:

    • Executing ls -l outputs a detailed directory manifest detailing file structures, owners, groups, and explicit security attributes.
    • Interpreting the 10-character10\text{-character} Permission String:
    • Character 11: Denotes file type (d indicates directory; - indicates a standard flat file).
    • Characters 2–42\text{--}4: Owner permissions (r = read, w = write, x = execute).
    • Characters 5–75\text{--}7: Group permissions (r, w, x).
    • Characters 8–108\text{--}10: Other/world permissions (r, w, x).
    • Following the permission bitstring, the output reports: Hard link count, Owner account, Group name, File size in bytes, Last modification timestamp, and File/Directory name.
    • Example: drwxr-xr-x 3 evan evan 4096 Aug 31 22:59 evan designates a directory (d) where the owner evan has full read, write, execute permissions (rwx), the group evan has read and execute permissions (r-x), and all other users have read and execute permissions (r-x).
    • chmod Command: Modifies permissions assigned to files or folders (e.g., chmod u=rwx script.sh).

Information about the evan directory displayed using the ls -l command

  • Remote Terminal Administration:

    • Telnet: Legacy unencrypted text protocol operating over TCP port 2323. Transmits credentials and operational payloads in clear text. Activated in Windows via the Windows Features control dialog; connected via telnet <IP_Address> (e.g., telnet 192.168.1.160).
    • SSH (Secure Shell): Cryptographically secure remote administration protocol encrypting traffic over TCP port 2222. Initiated via the syntax: ssh username@<IP_Address> (e.g., ssh jean@192.168.1.160).
    • Session Termination: Both remote protocols are cleanly exited using the logout shell command.
  • Cross-Platform File Sharing with Samba File Server:

    • Samba integrates Linux servers into Windows environments by implementing the Server Message Block (SMB) networking protocol.
    • The background service runs as a daemon named smbd (smbd.service / Samba SMB Daemon).
    • Allows Linux-hosted directory shares (such as /sambashare) to appear seamlessly inside Windows File Explorer using UNC network paths (e.g., \\192.168.128.25\sambashare) for cross-platform data synchronization.

Samba service running in background and Shoppinglist text file in the sambashare directory

Shoppinglist text file shown in Windows

Scripting Languages, Environment Variables, and Execution

  • Script Definition and Distinction from Compiled Programs:

    • Script: A text file containing a linear series of operating system commands or runtime instructions that is executed by an interpreter line-by-line in real time.
    • Compiled Program: Source code written in languages like C++, Visual Basic, or Java that is processed by a compiler into a binary machine-code executable (e.g., files terminating in .exe).
  • Scripting Languages and Target Extensions:

    • .bat: Batch file for the Windows Command Prompt (cmd.exe).
    • .ps1: PowerShell script for the Windows PowerShell automation shell.
    • .vbs: Visual Basic Scripting Edition (VBScript).
    • .sh: Shell script written for Unix/Linux shells (e.g., Bash).
    • .py: Python language script.
    • .js: JavaScript script executed via WScript or web runtimes.
  • Foundational Scripting Concepts:

    • Variables: Named memory abstractions allocated to hold variable data values. Assigning a starting value to a newly created variable is termed initializing the variable.
    • Common Data Types:
    • Integer: Whole numerical values without fractional components.
    • String: Alphanumeric textual data sequences.
    • Environmental Variables (System Variables): Dynamic global values provided by the underlying operating system to expose system states, user profiles, system paths, and hardware metadata to running processes and scripts.
    • In Windows, viewed and modified through System Properties > Advanced > Environment Variables.
    • Includes user-specific variables (Path, TEMP, TMP, OneDrive, PT7HOME) and system variables (ComSpec, DriverData, NUMBER_OF_PROCESSORS, OS, PATHEXT, PROCESSOR_ARCHITECTURE).

View, create, edit, and delete environmental variables

  • Comment Syntax: Explicit character symbols marking text lines as non-executable remarks intended for administrative documentation (e.g., # in Linux shell scripts and Windows PowerShell).

  • Loops: Programmatic structures that execute a block of commands repeatedly until a designated boundary condition or logical state is reached.

  • Conditional Branching: Logical evaluation blocks (e.g., if-then-else) executing designated script sequences only when conditions evaluate as true (such as running an update check only if elapsed time exceeds three days).

    • Shell Script Lifecycle Example:
  • Creation via redirection: `echo