In this article, you'll learn several ways to save Terminal commands on a Mac so you don't have to type them out over and over again. You'll also learn what to look for during the process.
Using Terminal on Your Mac – Beginner's Guide to the Command Line
If you want to save a quick command in Terminal for future reference or to paste elsewhere, there’s a simple, if not particularly technical, way to do it: the copy and paste commands. Here’s how to do it via Terminal.
In Terminal, type the command you want to save.
Drag the cursor to highlight the command.