Apple’s OS X operating system for Mac computers is based on Unix. Once of the benefits of a Unix-based system is the ability to modify files and run commands from a terminal — not dissimilar from Linux terminals and commands. How to deploy packages via Terminal. Launch Terminal.app. Enter the following command to install it as an administrator. When prompted, enter the administrator password, or prefix the command in step #2 with sudo to prompt for the admin credential if you're installing. Using Homebrew To Run Unverified Apps on Mac While Apple would prefer you to install apps through the App Store, you can bypass it completely with Homebrew. The benefit of using Homebrew to install macOS apps is that it bypasses the security mechanisms that Apple uses to “protect” you from unverified apps.
Each window in Terminal represents an instance of a shell process. The window contains a prompt that indicates you can enter a command. The prompt you see depends on your Terminal and shell preferences, but it often includes the name of the host you’re logged in to, your current working folder, your user name, and a prompt symbol. For example, if a user named michael is using the default zsh shell, the prompt appears as:
This indicates that the user named michael is logged in to a computer named MacBook-Pro, and the current folder is his home folder, indicated by the tilde (~).
On your Mac, do one of the following:
Click the Launchpad icon in the Dock, type Terminal in the search field, then click Terminal.
In the Finder , open the /Applications/Utilities folder, then double-click Terminal.
In the Terminal app on your Mac, choose Terminal > Quit Terminal.
In the Terminal app on your Mac, in the window running the shell process you want to quit, type
exit, then press Return.
This ensures that commands actively running in the shell are closed. If anything’s still in progress, a dialog appears.
If you want to change the shell exit behavior, see Change Profiles Shell preferences.
Most users use Disk Utility to erase a disk or hard drive. But some Mac users might need to erase them from the command line on Mac OS. To do that, the only thing you need is a bit of precise syntax to make sure that you are erasing the proper disk.
Here I'll show you how you can erase and format a disk using the command line.
Start off by running the following command in the command line: Diskutil list
This is going to list all the mounted drives on your Mac.
Once you have found the proper drive to erase, just copy its identifier so you can use it for the next command. Then pick a name and a system format type. This is the syntax we need: Diskutil eraseDisk FILESYSTEM DISKNAME DISKIDENTIFIER
Let’s say the disk I want to erase has “/dev/disk5s2” as its identifier and I’m going to use Mac OS Extended Journaled (JHFS+) as the system format type and name it “Empty”. The syntax is going to look like this: Diskutil eraseDisk JHFS+ Empty /dev/disk5s2
It’s important to keep in mind that if you run the eraseDisk command, the target disk is going to lose all its data, so make sure you are erasing the proper disk.
If you need different system format types, here are a few references you could use instead of JHFS+: