17.0 Supporting Other OS ____________________________________________________________________ 17.1 Linux Features ____________________________________________________________________ 17.1.1 Shells, Terminals, and Consoles So far in this course, you worked mostly with the Microsoft Windows operating system. A CompTIA A+ technician should be capable of supporting diverse OS environments. The various operating systems you might encounter use different interfaces and command syntax, but the functionality of those tools is common across all types of systems. The kernel is the core software component of an operating system, managing hardware and enabling communication between software and hardware. A Linux distribution (distro) combines the Linux kernel with a package manager, software repository, and customizable shells, utilities, and applications. Distros may offer community-supported or commercial licensing and support options. Bootloaders Before the operating system loads, a bootloader initializes the system. It is responsible for loading the kernel into memory and starting the operating system. Bootloaders support multi-boot configurations, allowing multiple operating systems on the same device. Common bootloaders for Linux include GRUB (GRand Unified Bootloader) and LILO (Linux Loader). Shells and Terminals A shell provides a command-line environment for users to interact with the OS and applications. Popular Linux shells include bash, zsh, and ksh (Korn shell), each offering features like command history, tab completion, spelling correction, and syntax highlighting. Many Linux distros operate without a desktop environment, launching a terminal interface connected to the default shell command interpreter during boot. The terminal and shell communicate via a teletype (tty) device, handling text input and output through separate streams: stdin (0): Captures keyboard input for processing by the shell's command interpreter. stdout (1): Displays data generated by the shell from the tty device on the terminal. stderr (2): Outputs error information. Using a terminal interactively involves direct command input, while non-interactive use involves executing commands from a script file. Desktop Environments Linux distros intended for client PCs usually start with a graphical desktop environment. This environment is powered by Xorg, an open-source implementation of the X Window System. Within Xorg, users can launch various desktop programs, such as Gnome (GNU Object Model Environment), KDE (K Desktop Environment), Cinnamon, and Xfce. Note: GNU stands for "GNU is Not UNIX," a recursive acronym. Many non-kernel software components developed under the GNU license replace proprietary UNIX equivalents and are compatible with Linux. Ubuntu 20 running the GNOME desktop with a virtual terminal window open to run commands in the Bash command environment Ubuntu 20 desktop with the virtual terminal window. Description Within a desktop environment, you can open a terminal emulator to use the default command shell (or an alternative shell if needed). The terminal emulator runs within a window on the desktop. The terminal emulator connects to the shell via a pseudoterminal (pty/pts) interface. Console Switching In systems with a graphical environment, the X server runs on a virtual tty console, typically tty1. Users can switch between consoles using CTRL+ALT+Fx keys, with each console supporting different login prompts and shells. ____________________________________________________________________ 17.1.2 Command Interface Linux commands follow a standard format: Command: The first "word" is the command, which can be a full or relative path to an executable, or simply the name of an executable located in a directory specified by the PATH environment variable. The command is recognized up to the first space character. Options: Options (or switches) modify the command's behavior. They can be single letters (preceded by a single hyphen) or words (preceded by a double hyphen). The order of options is generally flexible. Arguments: Arguments are values, such as file names, that the command operates on. They must be provided in the correct order according to the command's syntax. Pipes: Use a pipe (| ) to redirect the output of one command to another command. Multiple Commands: Use a semicolon (; ) to execute multiple commands sequentially on a single line. Press ENTER to run the commands in order. Case Sensitivity In Linux, commands, parameters, and file and directory names are all case-sensitive. For instance, ls -l file.data and ls -L File.data will yield different results. Typing a command name with incorrect capitalization will result in an error message. Help System To view a Linux command's function and syntax, use the --help option. Since the help output can be lengthy, it's common to pipe it to the more command for viewing one page at a time, e.g.,ls --help | more . Alternatively, use the man command to access detailed manual pages for any command, such as man man for the manual on the man command itself. Note: Terminal emulators often support TAB completion to assist with entering commands. Use the UP and DOWN arrow keys to navigate through command history. In some terminals, you can scroll through output using SHIFT+PAGEUP/PAGEDOWN or CTRL+SHIFT+UPARROW/DOWNARROW. Text Editors Most Linux files are in plain text format and can be easily edited. There are many text editors available. For those familiar with Windows, the nano editor is a simple option. To open or create a file, use nano filepath , or nano -l filepath to display line numbers. Navigate with the cursor keys and use CTRL + key shortcuts for operations, like CTRL+O to save changes and CTRL+X to exit. Many administrators prefer editors like vi or vim, which have two modes: command and insert. In command mode, you perform file operations like saving and closing. To enter text, switch to insert mode with keys like i (insert at cursor), a (append after cursor), A (append at line end), or o (insert new line below). Press ESC to return to command mode. To display line numbers, type:set number in command mode. Save with :w , save and quit with :wq , or quit without saving with :q! . Settings Full Screen Previous Chapter Play Video Next Chapter 00:00 1. Introduction to the Linux Terminal Interactive Script ____________________________________________________________________ 17.1.3 Navigation Commands In Linux, everything is represented as a file within a unified file system. The first fixed disk is typically /dev/sda , while additional devices, like a USB drive, appear as /dev/sdb . During boot, Linux loads the system kernel and a virtual file system into a RAM drive. The unified file system then locates the persistent root partition on the storage device and loads the disk's file system. Unlike Windows, Linux doesn't use drive letters like C: or D:. The file system begins at the root, represented d by /. From the root, directories and subdirectories can be created to organize files. The File System Hierarchy Standard (FHS) dictates directory naming and file placement. For example, /home contains user subdirectories for personal data, and /etc directory contains configuration files. Viewing the root directory and file system hierarchy standard (FHS) subdirectories in Ubuntu Linux Ubuntu file manager displaying system directories. Description Key commands for navigating the Linux file system include pwd,cd,ls, and cat. pwd Command The pwd command displays ("prints") the current working directory on the terminal, unless the standard output (stdout) is redirected. The working directory is important because commands without specified paths default to it. In some distributions, the prompt shows your current directory or a tilde (~) if you're in your home directory. cd Command The cd command changes the working directory. Here are some common uses: To change to an absolute path, such as /etc , use: cd /etc . This works from any current directory. To change to a subdirectory named documents, use a relative path: cd documents . The documents directory must be within the current directory. To move to the parent directory of your current location, use: cd .. . Copy Read Word A terminal window is open on a Linux system. The prompt displays tj@TJ-VM:~/Documents/lessons$, indicating the user is in the lessons directory within Documents. The terminal is idle, with no commands entered or executed. ls Command The ls command lists directory contents, similar to the dir command in Windows. Common options include -l for a detailed list and -a to show all files, including hidden or system files. For example, ls -la /etc displays all contents of the /etc directory in detail. cat Command The cat command displays the contents of files specified through arguments. Use the -n option to add line numbers to the output. To control scrolling, you can pipe the output to a pager like more or less (e.g.,cat file | more). The cat command can also be used to combine (concatenate) multiple files into one or display them sequentially. For example: To concatenate and display two files: cat file1 file2 To concatenate and redirect the output to a new file: Overwrite the destination file: cat file1 file2 > destination Append to the destination file: cat file1 file2 >> destination These redirection operators can be used with other commands as well. ____________________________________________________________________ 17.1.4 Search Commands Linux supports very fast and accurate file system informational search commands. find Command The find command searches for files using the syntax find path expression , where path is the starting directory and expression specifies the search criteria. Options include -name , -size , -user (owner), and -perm (permissions). The -type option identifies file types, distinguishing between files, directories, block devices, network sockets, symbolic links, and named pipes, unlike Windows, which uses file extensions. grep Command The grep command (Globally search a Regular Expression and Print) searches and filters file contents, displaying lines that match a search string. The search string can be a simple text (literal) or a pattern using regular expressions (regex). grep is particularly useful for searching long files like system logs. For example, grep -i "uid=1003" /var/log/messages displays lines in the system log containing "uid=1003", ignoring case with the -i option. Copy Read Word A terminal window is open on a Linux system. The prompt displays tj@TJ-VM:/var/log$, indicating the user is in the /var/log directory. The terminal is idle, with no commands entered or executed. grep can also search file names by piping a directory list as input. For instance, ls -l | grep audit lists files in the current directory with "audit" in their names. A terminal window is open on a Linux system. The prompt displays tj@TJ-VM:/var/log$, indicating the user is in the /var/log directory. The terminal is currently idle, with no commands entered or executed. Note: You can pipe output from other commands to grep to apply various filters. Metacharacters and Escaping In Linux, escaping means using a special character (usually a backslash \) to indicate that the following character should be treated as a literal rather than interpreted in its usual, special way. This is necessary when dealing with metacharacters, which have specific meanings in the shell. For example, the asterisk (*) is a metacharacter that matches any number of characters. To search for a literal asterisk, you must escape it. Similarly, expressions with spaces need escaping. There are three ways to escape strings: Backslash (\): Escapes the next character only. For example,\* treats * as a literal, and \\ treats \ as a literal. Single Quotes (' '): Provide strong escaping, treating everything inside as literal. For example,'$(pwd) * example one' is interpreted as: $(pwd) * example one. Double Quotes (" "): Provide weak escaping, allowing variable expansion and command substitution. For example,"$(pwd) * example one" expands to include the output of the pwd command, resulting in: /home/david * example one. ____________________________________________________________________ 17.1.5 Filesystem Management Filesystem management involves organizing, maintaining, and accessing data stored on disk drives. It includes tasks such as mounting filesystems, checking and repairing them, and configuring their behavior. Linux uses a hierarchical directory structure starting at the root (/). Directories and subdirectories organize files, and each storage device or partition can have its own filesystem. Key filesystem management tools include: Mounting: To access a filesystem, it must be mounted, which means attaching it to a directory in the existing filesystem hierarchy. The mount command is used for this purpose. For example, mount /dev/sda1 /mnt mounts the filesystem on /dev/sda1 to the /mnt directory. /etc/fstab: This file contains static information about filesystems. It defines how and where filesystems should be mounted automatically at boot time. Each line in /etc/fstab specifies a filesystem, its mount point, filesystem type, and mount options. For example, a typical entry might look like this: /dev/sda1 / ext4 defaults 0 1 This entry mounts the /dev/sda1 partition as the root filesystem (/) using the ext4 filesystem type with default options. fsck (Filesystem Check): This utility checks and repairs filesystems. It's used to ensure filesystem integrity, especially after an improper shutdown or disk corruption. The command fsck is typically run with the filesystem's device name, like fsck /dev/sda1. It scans the filesystem for errors and attempts to fix them. It's often run automatically at boot if the system detects filesystem issues. ____________________________________________________________________ 17.1.6 File Management Commands File management commands are used to move, copy, and delete data. cp Command The cp command​ is used to create a copy of files either in the same or different directory with the same or different name. For example:​ ​​Copy ​file1.txt​ in the current working directory to a new file called file1.old​in the same directory:​ ​cp file1.txt file1.old​ ​​​Copy the file ​hosts​ from the directory ​ /etc​into the directory /tmp , keeping the file name the same:​ ​cp /etc/hosts /tmp​ ​​​Copy all files beginning with the name ​message​ from the ​/var/log​ directory into ​/home/david​. The ​ -v​option displays the files copied:​ ​cp -v /var/log/message* /home/David mv Command The ​mv command​ is used to either move files from one directory to another or rename a file. For example:​ ​​Move the file ​data.txt​ from the ​ /home/david​directory to the ​ /tmp​directory, keeping the file name the same:​ ​mv /home/david/data.txt /tmp​ ​​​Move and rename the file ​alarm.dat​ in the current directory to alarm.bak​in ​ /tmp :​ ​mv alarm.dat /tmp/alarm.bak​ ​​​Rename the file ​app1.dat​ in the ​ /var/log​folder to ​ app1.old : ​mv /var/log/app1.dat /var/log/app1.old The cp command with the -r (or --recursive) option is also used to copy directories. For example: Copy the directory project from the /home/david directory to the /tmp directory: cp -r /home/david/project /tmp Copy and rename the directory backup in the current directory to backup_old in /tmp: cp -r backup /tmp/backup_old rm Command The ​rm command​ can be used to delete files. It can also be used with the -r​option to delete directories. For example:​ ​​Remove the single file data.old from the current working directory:​ ​rm data.old​ ​​​Remove all files ending in ​.bak​ from the ​ /var/log​directory:​ ​rm /var/log/*.bak​ ​​​Remove the contents of the entire directory tree underneath the folder ​/home/david/data​:​ ​​rm -r /home/david/data​ Note: ​​​Use -r with caution, as Linux commands do not prompt for confirmation. There is no opportunity to cancel. df and du Commands The ​df/du commands​ check free space and report usage by the device, directory, or file specified as the argument:​ ​​df​ ("disk free") enables you to view the device's free space, file system, total size, space used, percentage value of space used, and mount point.​ ​​du​ ("disk usage") displays how a device is used, including the size of directory trees and files within it. Interactive Mobile Placeholder This content is only available on larger screen sizes. Please revisit this page on a larger device. ____________________________________________________________________ 17.1.7 User Account Management In Linux, the root account, or superuser, has full administrative privileges and can perform any action on the system. It should be used only when absolutely necessary. During setup, most Linux distributions prompt you to create a regular user account for daily tasks. Instead of staying logged in as root, you can use special commands to temporarily elevate your privileges when needed. su Command The su (switch user) command switches to the specified user's account using su username. To switch to the root account, omit the username. You'll be prompted for the target account's password before switching. Using su without options retains the original user's profile and home directory. Using su - switches to the root account and starts a new shell with root's environment, which is a better practice. sudo Command The sudo (superuser do) command allows users listed in the /etc/sudoers file to run specified commands with superuser privileges. In distributions using sudo, this setup is typically handled during installation. Users enter sudo followed by the desired command and may need to confirm their password if it hasn't been cached recently. Note: The main advantage of sudo over su is that the root password doesn't need to be shared among multiple administrators. User Management Commands User settings are stored in the /etc/passwd file, while group settings are in the /etc/group file. User passwords are typically stored as encrypted hashes in the /etc/shadow file, along with other password settings like age and expiration date. Use the useradd,usermod, and userdel commands to add, modify, and delete user information. The passwd command is used to change passwords. Group Management Commands Each user account can be assigned to groups to manage file permissions. Use the groupadd, groupmod, and groupdel commands to manage group memberships. A user can belong to multiple groups but has only one effective group ID at a time, listed in /etc/passwd. The effective group ID can be changed using the newgrp command. ____________________________________________________________________ 17.1.8 File Permissions Commands Each file in Linux has a set of permissions that determine user access levels. The permissions system includes three rights: Read (r): Allows viewing the contents of a file or directory. Write (w): Allows modifying or deleting the object. For directories, it permits adding, deleting, or renaming files within. Execute (x): Allows running an executable file or script. For directories, it enables actions like changing focus to the directory and accessing or searching items within it. Permissions are set for the owner, the group, and other users ("the world"). In symbolic mode notation, permissions are shown as allowed (r, w, x) or denied (-). For example, using ls -l for a long directory listing: drwxr-xr-x 2 bobby admins Desktop : The owner (bobby) has full (rwx) permissions, while the group (admins) and others have read and execute (r-x) permissions. -rwxr-xr-- 1 bobby admins scan.sh : The owner has read/write/execute (rwx) permissions, the group has read and execute (r-x), and others have read (r--) permissions. Permissions can also be expressed numerically using octal values (0–7), where: 0: No permissions 4: Read 2: Write 1: Execute For example, numeric permission 0754 translates to: 7: Owner has all rights (4+2+1) 5: Group has read and execute (4+0+1) 4: Others have read (4+0+0) The leading zero indicates octal format but can often be omitted. Another common combination is 6 (read and write). chmod Command The chmod command changes file and directory permissions using symbolic or octal notation. Only the owner can change permissions. Modifying permissions using the chmod command A diagram showing the process of altering file permissions using c h mod with examples of original, confirmed, and modified permissions. chown Command The chown command allows the superuser or sudoers to change the owner of a file or directory. Regular users cannot use chown , even if they own the file, but they can change the group using the chgrp command. The basic syntax for the chown command is: chown [OPTIONS] OWNER[:GROUP] FILE OWNER: The new owner of the file or directory. GROUP (optional): The new group for the file or directory. If omitted, only the owner is changed. FILE: The file or directory to modify. Examples: 1. Change the owner of a file: chown username file.txt 2. Change both the owner and group: chown username:groupname file.txt 3. Change ownership recursively for a directory and its contents: chown -R username:groupname /path/to/directory 4. Change only the group (using :): chown :groupname file.txt ____________________________________________________________________ ____________________________________________________________________ 17.2 Package and Network Management ____________________________________________________________________ 17.2.1 Package Management Commands Linux software is available as source code and pre-compiled applications. Source code packages require compilation with the appropriate compiler and options. Pre-compiled packages can be installed using a package manager, which varies by distribution: Advanced Packaging Tool (APT): Used by Debian-based distributions, working with .deb format packages. DNF (Dandified YUM): Used by Red Hat-based distributions, working with .rpm format packages. DNF is the successor to YUM, offering improved performance and better dependency management. Distributions and Repositories A distribution includes precompiled software packages deemed appropriate by the vendor or sponsor. These packages, along with updates, are posted to software repositories. Vendors often maintain multiple repositories, such as stable, beta, and unsupported packages. Listing package manager sources in Ubuntu Linux Few lines of code listing package manager sources in Ubuntu Linux. Package managers must be configured with the web addresses of desired repositories, typically done automatically during setup. They handle installing, uninstalling, and updating software. Package integrity is verified using cryptographic hashes or signatures, such as MD5, SHA-256, or GPG, before installation or updates. The hash value and function are published on the package vendor's site. apt Command apt is the preferred command-line interface for APT. Basic commands include: Refresh package information: apt update Upgrade all packages: apt upgrade Install new application: apt install PackageName For older systems or scripts, you may encounter the apt-get command, which provides similar functionality: Refresh package information: apt-get update Upgrade all packages: apt-get upgrade dnf Command dnf is the command-line interface for managing packages in Red Hat-based distributions. Basic commands include: Refresh package information: dnf check-update Upgrade all packages: dnf update or dnf upgrade Note: Both update and upgrade are interchangeable in DNF, but upgrade is the preferred term in modern usage. Install a new application: dnf install PackageName Remove an application: dnf remove PackageName Interactive Mobile Placeholder This content is only available on larger screen sizes. Please revisit this page on a larger device. ____________________________________________________________________17.2.2 Process Monitoring Commands Every process in Linux is assigned a unique process ID (PID) upon starting, allowing the system and users to identify it. This PID is a non-negative integer that increments with each new process. PID 1 is reserved for the initial daemon, the first process to start, serving as the parent of all other processes. Subsequent processes, whether initiated by the system or a user, receive the next available higher PID. ps Command The ps command displays the process table, summarizing the currently running processes on a system. Without options, it shows processes run by the current shell, including details like PID, associated terminal or pseudoterminal, accumulated CPU time, and the command that started the process. Various options can be used to filter and customize the displayed fields or processes. Listing all processes on the system. Note that a question mark indicates that a process has no controlling terminal. A terminal window shows the output of the p s -e command on a Linux system. Description top Command The top command, like ps, lists all running processes on a Linux system. It serves as a process management tool, allowing you to interactively prioritize, sort, or terminate processes. It displays a dynamic, real-time view of process statuses. Listing the state of running processes A terminal window displays the top command output on a Linux system. Description Various keystrokes execute process management actions, including: ENTER: Refresh the status of all processes. SHIFT+N: Sort processes in decreasing PID order. M: Sort processes by memory usage. P: Sort processes by CPU usage. u: Display processes for a specified user at the prompt. q: Exit the process list. systemd and systemctl Command systemd is an init system and service manager for Linux operating systems. It is responsible for initializing the system and managing system services and processes. The systemctl command is used to interact with systemd to control and manage system services. Key commands include: systemctl start [service] : Start a service immediately. systemctl stop [service] : Stop a running service. systemctl enable [service] : Enable a service to start automatically at boot. systemctl disable [service] : Disable a service from starting automatically at boot. systemctl status [service] : Check the status of a service, including whether it is active, inactive, or failed. Settings Full Screen Previous Chapter Play Video Next Chapter 00:00 1. Managing Processes on Linux Interactive Script ____________________________________________________________________ 17.2.3 Network Management Commands In Linux, Ethernet interfaces were traditionally named eth0, eth1, etc., but modern distributions often use names like enp0s3 or ens33, based on the system's hardware topology. It's important to differentiate between the running and persistent configurations. The persistent configuration is applied after a reboot or when a network adapter is reinitialized, and the method for applying an IP configuration varies by distribution. Historically, persistent configurations were managed by editing the /etc/network/interfaces file and using ifup and ifdown scripts to bring interfaces up or down. Now, many distributions use the NetworkManager package, manageable via a GUI or the nmcli command-line tool. Alternatively, network configurations can be managed using the systemd-networkd configuration manager. ip Command The ip command is a powerful tool for network configuration and management. It replaces older tools like ifconfig and route. It can be used to assign IP addresses, configure routing, and manage network interfaces. Example usage: ip addr show # Display all network interfaces and their IP addresses​​ ip link set enp0s3 up # Bring up the network interface enp0s3​ ip route show # Display the routing table /etc/hosts The/etc/hosts file is a simple text file that maps hostnames to IP addresses. It is used for local hostname resolution before querying DNS servers. Entries in this file can be used to override DNS settings or to define local network names. Example entry in /etc/hosts: 127.0.0.1 localhost 192.168.1.10 myserver.local /etc/resolv.conf The /etc/resolv.conf file contains information that defines how DNS (Domain Name System) resolution is handled. It specifies the DNS servers that the system should query to resolve domain names into IP addresses. Example entry in /etc/resolv.conf: nameserver 8.8.8.8 nameserver 8.8.4.4 ping Command The ping command is used to test the reachability of a host on an IP network. It sends ICMP echo request packets to the target host and waits for an echo reply, helping to diagnose network connectivity issues. Example usage: ping example.com dig Command The dig (Domain Information Groper) command is a flexible tool for querying DNS name servers. It performs DNS lookups and displays the answers returned by the DNS server. Example usage: dig example.com curl Command The curl command is a tool for transferring data from or to a server using various protocols, including HTTP, HTTPS, FTP, and more. It is commonly used for testing and interacting with web services and is especially good for API interaction. Example usage: curl http://example.com traceroute Command The traceroute command is a network diagnostic tool used to track the pathway that a packet takes from the source to the destination. It helps in identifying the route and measuring transit delays of packets across an IP network. Example usage: traceroute example.com This command will display each hop along the route to the destination, showing the IP address and the time taken for each hop. It is useful for diagnosing network issues and understanding the path data takes through the network. ____________________________________________________________________ 17.2.4 Backup and Scheduling Commands Linux doesn't have an "official" backup tool, but you can create a custom backup solution using the cron job task scheduler and file copy scripts, possibly incorporating compression utilities like tar or gzip. There are also many commercial and open-source backup products available, such as Amanda, Bacula, Fwbackups, and Rsync. To run a batch of commands or scripts for backups or maintenance tasks, use the cron scheduling service. Each user can schedule tasks in their personal crontab (cron table), which cron merges into a system-wide schedule. The cron service checks this schedule every minute to execute tasks. Use the crontab editor to add or delete scheduled jobs. View a user's crontab jobs with crontab -l. Remove scheduled jobs with crontab -r. Enter the editor with crontab -e (default editor is vi). Crontab Syntax The basic syntax for scheduling a job in crontab includes: mm: Minutes past the hour (0–59). hh: Hour of the day (0–23). dd: Day of the month (1–31). MM: Month (1–12 or jan, feb, mar). weekday: Day of the week (0–7 or sun, mon, tue). command: Command or script to run, including the full path. Time/date parameters can be replaced by wildcards: *: Any value. ,: Multiple values. -: Range of values. /n: Every nth value. For example, consider the following crontab entry: 15 02 * * 5 /usr/bin/rsync -av --delete /home/sam /mount/rsync This entry runs the rsync backup program at 2:15 a.m. every Friday (day 5), synchronizing files from /home/sam to /mount/rsync with increased verbosity (-v). The --delete option removes files on the source side (/home/sam) that don't exist on the destination. ____________________________________________________________ ____________________________________________________________________ 17.3 macOS Features ____________________________________________________________________ 17.3.1 Interface Features When using an Apple Mac for the first time, you'll notice similarities and differences compared to a Windows-based PC. Like Windows, macOS boots to a graphical desktop environment, and any apps configured to launch at startup will do so. Located at the top of the screen, the menu bar is always present and displays commands for the active window. To the left of the menu bar is the Apple menu, which provides options for support information (About), logging out, or shutting down. Menu bars with different apps running MacOS menu bars are shown. Screenshot reprinted with permission from Apple Inc. Description Dock Positioned at the bottom of the screen, the Dock offers one-click access to favorite apps and files, similar to the Windows taskbar. Open apps display a dot below their icon. Spotlight Search Use Spotlight Search to find almost anything on macOS. Start a search by clicking the magnifying glass in the menu bar or pressing COMMAND+SPACE. Terminal Access the command-line environment via the Terminal, which uses the Z shell (zsh) by default from macOS Catalina onward. Older versions use Bash. Mission Control and Multiple Displays Mission Control manages windows and allows setting up multiple desktops with different apps and backgrounds. Activate Mission Control with the F3 key. To move an app to a specific desktop, drag its window to the desired desktop at the top. Switch between desktops using the F3 key, CONTROL+LEFT/RIGHT, or a 3-/4-finger swipe gesture. Mission Control is used to switch between windows and manage multiple desktops A mac O S Mission Control settings window is displayed. Screenshot reprinted with permission from Apple Inc. Description ____________________________________________________________________ 17.3.2 System Folders and Finder System folders in macOS are directories that contain essential files and resources required for the operating system and applications to function properly. These folders are typically located at the root level of the system drive and include: /Applications: Contains applications installed for all users on the Mac. /Library: Stores system-wide resources and settings used by applications and macOS, such as fonts, application support files, and system preferences. /System: Contains core system files and resources essential for macOS operation. This folder is managed by the operating system and is generally not modified by users. /Users: Houses individual user accounts, with each user having a personal folder containing their documents, settings, and personal data. /Users/Library: A hidden folder within each user's home directory that stores user-specific application support files, preferences, caches, and other data. These system folders are crucial for the stability and functionality of macOS, and users typically interact with them indirectly through applications and system settings. Finder The Finder is the macOS equivalent of File Explorer in Windows. It lets the user navigate all the files and folders on a Mac. It is always present and open in the dock. ____________________________________________________________________ 17.3.3 System Settings System folders in macOS are directories that contain essential files and resources required for the operating system and applications to function properly. These folders are typically located at the root level of the system drive and include: /Applications: Contains applications installed for all users on the Mac. /Library: Stores system-wide resources and settings used by applications and macOS, such as fonts, application support files, and system preferences. /System: Contains core system files and resources essential for macOS operation. This folder is managed by the operating system and is generally not modified by users. /Users: Houses individual user accounts, with each user having a personal folder containing their documents, settings, and personal data. /Users/Library: A hidden folder within each user's home directory that stores user-specific application support files, preferences, caches, and other data. These system folders are crucial for the stability and functionality of macOS, and users typically interact with them indirectly through applications and system settings. Finder The Finder is the macOS equivalent of File Explorer in Windows. It lets the user navigate all the files and folders on a Mac. It is always present and open in the dock. ____________________________________________________________________ 17.3.4 Security and User Management When macOS is installed, an Administrator account and an optional Guest User account are created. To add a new account, go to System Settings > Users & Groups. Apple ID Each local account can be linked to an Apple ID, used for App Store purchases, iCloud access, and other functions. Users may already have an Apple ID from iTunes or iOS devices. You can sign in or out of your Apple ID via the System Preferences home page. The Sign In & Security button in System Settings allows you to link an Apple ID to the local account An Apple account page. Screenshot reprinted with permission from Apple Inc. Description Privacy & Security macOS allows you to configure analytics, telemetry data, and app permissions for features like location services, camera, contacts, and calendar. Adjust these settings in the Privacy & Security preferences pane. Privacy & Security showing privacy options Privacy and security settings are displayed. Screenshot reprinted with permission from Apple Inc. Description Note: Some changes require administrator approval; click the lock icon and authenticate to modify settings. Internet Accounts and Keychain The Internet Accounts pane lets you associate email and cloud accounts with your login. Keychain manages passwords for these accounts, websites, and Wi-Fi networks. iCloud Keychain syncs passwords across macOS and iOS devices. Use the Keychain Access app (in Utilities) to manage passwords. If you forget a password, search for it, select the entry, check "Show password," and enter an administrator password to view it. If issues arise, use Keychain First Aid for repairs. FileVault FileVault encrypts disk data to protect against unauthorized access if the disk is removed. When enabled, each user account requires a password. Configure a recovery method when encrypting for the first time. The recovery key can be stored in iCloud or recorded locally (avoid saving it on the encrypted disk). ____________________________________________________________________ 17.3.5 iCloud and Continuity Like Windows, a Mac can store files on local drives, but cloud storage offers a more secure option and simplifies data synchronization across devices. iCloud is Apple's cloud storage solution, providing a central location for mail, contacts, calendar, photos, notes, reminders, and more across macOS and iOS devices. Users receive 5 GB of free storage by default, with options to upgrade for a monthly fee. This storage is shared across all iCloud components and devices. FaceTime is a video and audio calling service that allows users to make calls over the internet to other Apple devices. It seamlessly integrates with iCloud to sync call history and contacts, enabling users to start a call on one device and continue it on another. iMessage is Apple's messaging service that allows users to send texts, photos, videos, and more between Apple devices. It uses iCloud to sync messages across devices, ensuring that conversations are up-to-date and accessible from any Apple device. iCloud Drive allows users to store and access files from any device connected to their iCloud account, enhancing productivity and accessibility by providing a unified file storage solution. Using the Apple ID to configure iCloud synchronization options A screen shows iCloud synchronization options. Screenshot reprinted with permission from Apple Inc. Description Continuity Continuity is a set of features in macOS and iOS that allows seamless integration and interaction between Apple devices. It enhances the user experience by enabling tasks to be started on one device and continued on another. Key Continuity features include: Handoff: Allows you to start a task on one Apple device (like writing an email or browsing a webpage) and continue it on another device. Universal Clipboard: Lets you copy content (text, images, etc.) on one Apple device and paste it on another. Continuity Camera: Enables you to take a photo or scan a document with your iPhone or iPad and have it appear instantly on your Mac. Phone Calls and Text Messages: Allows you to make and receive phone calls and send and receive SMS/MMS messages on your Mac using your iPhone. Instant Hotspot: Lets your Mac connect to the internet using the cellular connection of your iPhone or iPad without requiring a password. Auto Unlock: Allows you to unlock your Mac automatically when you're wearing an authenticated Apple Watch. AirDrop: Facilitates easy sharing of files between Apple devices without the need for email or messaging. These features require devices to be signed in to the same Apple ID and connected to the same Wi-Fi network, with Bluetooth enabled. ____________________________________________________________________ 17.3.6 App Installation and Management macOS apps are distributed mainly through the App Store and direct downloads. Installation from the App Store The App Store is a central platform for distributing free and paid software, as well as macOS updates and new releases. Access requires an Apple ID. Monitoring the App Store for available updates A mac O S App Store updates window is displayed. The main section lists upcoming automatic updates, including an update for X code. Screenshot reprinted with permission from Apple Inc. Description Installation of Downloaded Apps Some apps, like Adobe Creative Cloud and Skype, are not available in the App Store. Download these from the vendor's website, ensuring you select the macOS version. Drag the downloaded app to the Applications folder to install it. By default, macOS allows app installations only from the App Store and identified developers. To change this, go to System Settings> Security & Privacy, click the padlock, and enter the Administrator password to adjust settings. macOS Package Installer File Types: DMG (.dmg): Used for simple installs where disk image contents are copied to the Applications folder. PKG (.pkg): Used for installs requiring additional actions, like running services or writing files to multiple folders. Installed apps are placed in a directory with an APP extension (.app) in the Applications folder. Note: App installs might be restricted to the app store as a security setting. App Uninstallation Process To uninstall an app, use Finder to delete the .APP directory. Dragging an app to the Trash is unreliable for a complete uninstallation because it often leaves behind associated or cached files. Antivirus Like any software, macOS is vulnerable to security threats and advisories, some of which could allow an unprivileged user to gain root access. It's crucial to patch macOS systems against known vulnerabilities. While infections by conventional viruses or worms are relatively rare, new threats can still emerge. macOS is susceptible to malware like fake security alerts and Trojans. Additionally, a macOS host can transmit Windows viruses to others via email or file transfer. If a Windows boot partition is present, it can also become infected with a virus. ​ To protect a macOS computer from infection, follow these steps: Download Trusted Apps: By default, macOS allows app installations only from the App Store. If you change this setting, ensure you download apps from trusted websites. Download Trusted Content: Always obtain media and other content from reliable sources. Use Antivirus Software: Consider using free antivirus packages for Mac, such as Avira, Avast, or Sophos, to detect macOS malware and Windows viruses, preventing their spread via email or file sharing. Protect Windows Partitions: If you have a bootable Windows partition (Boot Camp), treat it like a standalone Windows computer. Use antivirus software and follow standard security practices to protect it. Corporate Restrictions macOS can be enrolled in a mobile device/endpoint management suite, allowing restrictions on app installation and uninstallation. Corporate apps can be pushed via the Business Manager portal. For more information, refer to Apple's Platform Deployment guide at support.apple.com/guide/deployment/welcome/web. Settings Full Screen Previous Chapter Play Video Next Chapter 00:00 1. Installing Apps on a Mac Interactive Script ____________________________________________________________________ 17.3.7 OS and App Updates In macOS, the App Store checks daily for updates and patches for installed apps. If a new version is available, a notification appears on the App Store icon in the Dock. Following best practices, it is recommended to select the "Update All" button to ensure all apps and macOS updates are current. Keeping your system and apps up-to-date is a key best practice for maintaining security and performance. To enable automatic app updates on macOS: For App Store updates: Go to App Store and enable options to automatically download and install App Store updates. For macOS updates: Go to System Settings > General > Software Update and configure automatic download and installation of macOS updates. Software Update showing that a macOS version upgrade is available A mac O S Software Update window showing an available mac O S Sequoia 15.2 update with an Upgrade Tonite and Update Now button. Screenshot reprinted with permission from Apple Inc. Most third-party apps downloaded outside the App Store will check for updates when launched, prompting you to update or cancel. As a best practice, you should manually check for updates within the app, typically by selecting "Check for Updates" in the app's menu. Rapid Security Response (RSR) Rapid Security Response (RSR) in macOS delivers important security updates faster than traditional software updates. It addresses vulnerabilities and threats without needing a full operating system update, ensuring users receive critical patches promptly to protect against exploits. RSR updates are smaller and quicker to install, minimizing user disruption. They can be applied automatically or manually, based on user settings. ____________________________________________________________________ 17.3.8 Network and Device Settings Various options in System Preferences allow you to add and configure hardware devices. Network Manage network settings from the Status menu on the right-hand side of the menu bar or via System Preferences. Status menus in the Menu bar A mac O S menu bar with icons for battery, Wi-Fi, user profile, search, screen mirroring, and Siri. The date and time are displayed. Screenshot reprinted with permission from Apple Inc. Use the "Advanced" button to configure IP properties, proxy settings, and other network options. Select the Advanced button in the Network prefpane to configure Wi-Fi options, IP and DNS settings, and proxy settings. A mac O S Network settings window showing I P v 4 configurations. Screenshot reprinted with permission from Apple Inc. Description Printers & Scanners Use the Printers & Scanners prefpane to add and manage print and scan devices. Disk Utility The Disk Utility app can verify or repair a disk or file system and erase a disk with security options if you are selling or passing on a Mac. Use the Disk Utility to report storage status and configure and format volumes A mac O S Disk Utility window showing Macintosh H D as an A P F S System Snapshot with storage, usage details, and a graphical storage bar. Screenshot reprinted with permission from Apple Inc. Regular defragmentation is not necessary for Mac hard drives, and defragmentation is rarely needed. Settings Full Screen Previous Chapter Play Video Next Chapter 00:00 1. Managing Network Settings Interactive Script ____________________________________________________________________ 17.3.9 Time Machine Backup The Time Machine preferences pane allows you to back up data to an external drive or partition formatted with APFS or macOS's older extended file system (HFS+). By default, Time Machine keeps hourly backups for the past 24 hours, daily backups for the past month, and weekly backups for all previous months. When the backup drive becomes full, Time Machine automatically deletes the oldest backups to free up space. Configuring Time Machine. A mac O S Time Machine settings window showing backup options. The disk has 640 G B available, with automatic backups enabled but no backups yet. Screenshot reprinted with permission from Apple Inc. To restore files from Time Machine, use the timeline on the right side of the screen to view available backups. In the Time Machine Finder window, locate the folder with the file(s) you want to restore, and slide the timeline back to the desired date/time. Note: Time Machine also stores backups as local snapshots on the internal drive. If the backup drive is not connected, you may still be able to restore a file or version from these local snapshots. If a tick mark next to an item in the timeline is dimmed, the backup drive must be connected to restore that item. ____________________________________________________________________ 17.3.10 Troubleshoot Crashes and Boot Issues macOS comes with several tools to troubleshoot app, OS, and data issues. App Crashes and Force Quit When an app is busy or processing a complex request, the spinning wait cursor may appear. If it remains visible for an extended period, the app might be unresponsive. To close and restart the app without rebooting the computer, use Force Quit from the Apple menu or press COMMAND+OPTION+ESC. Using Force Quit to stop an app that is not responding A mac O S Force Quit Applications window listing open apps, with Mail marked as not responding. A Force Quit button is at the bottom. Screenshot reprinted with permission from Apple Inc. Recovery Menu macOS includes utilities to restore a Mac from a Time Machine backup, reinstall macOS, or reformat and repair the system disk. To access the Recovery menu, hold down the COMMAND+R keys while powering up the Mac until you see the Apple logo. After selecting your language, macOS Recovery will launch, allowing you to choose from various recovery options. macOS Recovery menu A mac O S Utilities window with options to restore from Time Machine, reinstall mac O S, get help online, or use Disk Utility. Screenshot reprinted with permission from Apple Inc. If an Apple Mac's startup drive is unavailable, it may boot into Internet Recovery Mode if connected to the Internet. This mode downloads a minimal recovery system from Apple's servers, allowing you to reinstall macOS or perform recovery tasks. To restore a Mac to a specific point in time, such as after replacing or reformatting the hard drive, use a Time Machine backup. Time Machine lets you restore the entire system or specific files to a previous state, aiding in data recovery and system restoration. Interactive Mobile Placeholder This content is only available on larger screen sizes. Please revisit this page on a larger device. ____________________________________________________________________ ____________________________________________________________________ ____________________________________________________________________ //ENDOFCHAPTER