Take Control of the Mac Command Line with Terminal

Take Control of the Mac Command Line with Terminal

EBOOK EXTRAS: v3.1.2 Downloads, Updates, Feedback TAKE CONTROL OF THE MAC COMMAND LINE WITH TERMINAL by JOE KISSELL $14.99 3rd Click here to buy the full “Take Control ofthe Mac Command Line with Terminal” EDITION Table of Contents Read Me First ............................................................... 6 Updates and More ............................................................. 6 Basics .............................................................................. 7 What’s New in Versions 3.1.1 & 3.1.2 ................................... 8 What Was New in Version 3.1 ............................................. 8 What Was New in Version 3.0.1 ........................................... 9 What Was New in the Third Edition .................................... 10 Introduction .............................................................. 12 macOS Command Line Quick Start ............................. 15 Understand Basic Command-Line Concepts ............... 17 What’s Unix? ................................................................... 17 What’s a Command Line? ................................................. 18 What’s a Shell? ............................................................... 19 What’s Terminal? ............................................................. 20 What Are Commands, Arguments, and Flags? ..................... 22 What Changed in Catalina? ............................................... 26 What Changed in Big Sur? ................................................ 33 Get to Know (and Customize) Terminal ..................... 36 Learn the Basics of Terminal ............................................. 36 Modify the Window .......................................................... 38 Open Multiple Sessions .................................................... 39 Change the Window’s Attributes ........................................ 40 Change Your Current Shell ................................................ 43 Set a Default Shell ........................................................... 44 Look Around .............................................................. 47 Discover Where You Are ................................................... 47 See What’s Here ............................................................. 48 Repeat a Command ......................................................... 50 Cancel a Command .......................................................... 52 2 Click here to buy the full 221-page “Take Control ofthe Mac Command Line with Terminal” for only $14.99! Move into Another Directory ............................................. 52 Jump Home .................................................................... 55 Understand How Paths Work ............................................. 56 Understand the macOS Directory Structure ......................... 58 Use Tab Completion ......................................................... 60 Find a File ...................................................................... 62 View a Text File ............................................................... 64 Get Help ........................................................................ 66 Clear the Screen ............................................................. 68 End a Shell Session ......................................................... 68 Work with Files and Directories ................................. 70 Create a File ................................................................... 70 Create a Directory ........................................................... 71 Copy a File or Directory .................................................... 72 Move or Rename a File or Directory ................................... 74 Delete a File ................................................................... 76 Delete a Directory ........................................................... 77 Use Symbolic Links .......................................................... 78 Work with Programs .................................................. 80 Learn Command-Line Program Basics ................................. 80 Run a Program or Script ................................................... 83 Run a Program in the Background ...................................... 88 See What Programs Are Running ....................................... 89 Stop a Program ............................................................... 92 Edit a Text File ................................................................ 94 Create Your Own Shell Script ............................................ 97 Customize Your Defaults ......................................... 101 About Startup Files ........................................................ 101 Edit .zshrc or .bash_profile ............................................. 102 Create Aliases ............................................................... 102 Modify Your PATH ........................................................... 104 Change Your Prompt ...................................................... 104 Bring the Command Line into the Real World .......... 107 Get the Path of a File or Folder ........................................ 107 3 Click here to buy the full 221-page “Take Control ofthe Mac Command Line with Terminal” for only $14.99! Open the Current Directory in the Finder .......................... 109 Open a Hidden Directory without Using Terminal ................ 109 Open the Current Folder in Terminal ................................. 110 Run a Shell Script from the Finder ................................... 111 Open a macOS App ........................................................ 112 Open a File in macOS ..................................................... 112 Log In to Another Computer .................................... 113 Start an SSH Session ..................................................... 113 Run Commands on Another Computer .............................. 115 End an SSH Session ....................................................... 116 Transfer Files with sftp or scp .......................................... 116 Work with Permissions ............................................ 120 Understand Permission Basics ......................................... 120 Change an Item’s Permissions ......................................... 124 Change an Item’s Owner or Group ................................... 126 Perform Actions as the Root User ..................................... 127 Learn Advanced Techniques .................................... 131 Pipe and Redirect Data ................................................... 131 Get a Grip on grep ......................................................... 135 Add Logic to Shell Scripts ............................................... 138 Install New Software ............................................... 149 Use Command Line Tools for Xcode .................................. 150 Install Unix Software from Scratch ................................... 152 Use a Package Manager .................................................. 156 Learn Command-Line Shortcuts ............................... 164 Terminal Tips and Shortcuts ............................................ 164 Zsh Tips and Shortcuts ................................................... 166 Command-Line Recipes ........................................... 173 Change Defaults ............................................................ 173 Perform Administrative Actions ........................................ 178 Modify Files .................................................................. 184 Work with Information on the Web ................................... 188 Manage Network Activities .............................................. 189 4 Click here to buy the full 221-page “Take Control ofthe Mac Command Line with Terminal” for only $14.99! Do More with SSH .......................................................... 194 Work with Remote Macs ................................................. 196 Troubleshoot and Repair Problems ................................... 197 Get Help in Style ........................................................... 206 Do Other Random Tricks ................................................. 209 About This Book ...................................................... 217 Ebook Extras ................................................................. 217 About the Author and Publisher ....................................... 218 Also by Joe Kissell ................................................... 220 Copyright and Fine Print .......................................... 221 5 Click here to buy the full 221-page “Take Control ofthe Mac Command Line with Terminal” for only $14.99! Read Me First Welcome to Take Control of the Mac Command Line with Terminal, Third Edition, version 3.1.2, published in April 2021 by alt concepts inc. This book was written by Joe Kissell and edited by Geoff Duncan. This book introduces you to the macOS command line environment, teaching you how to use the Terminal utility to accomplish useful, interesting tasks that are either difficult or impossible to perform in the graphical interface. Most of the examples work with 10.6 Snow Leopard and later, although a few techniques require more recent versions of macOS. If you want to share this ebook with a friend, we ask that you do so as you would with a physical book: “lend” it for a quick look, but ask your friend to buy a copy for careful reading or reference. Discounted classroom and user group copies

View Full Text

Details

  • File Type
    pdf
  • Upload Time
    -
  • Content Languages
    English
  • Upload User
    Anonymous/Not logged-in
  • File Pages
    47 Page
  • File Size
    -

Download

Channel Download Status
Express Download Enable

Copyright

We respect the copyrights and intellectual property rights of all users. All uploaded documents are either original works of the uploader or authorized works of the rightful owners.

  • Not to be reproduced or distributed without explicit permission.
  • Not used for commercial purposes outside of approved use cases.
  • Not used to infringe on the rights of the original creators.
  • If you believe any content infringes your copyright, please contact us immediately.

Support

For help with questions, suggestions, or problems, please contact us