Wondershare Recoverit

Hard Drive Recovery

  • Recovers deleted or lost files from hard drive effectively, safely and completely.
  • Supports data recovery from 500+ data loss scenarios, including computer crash, partition loss, accidental human error, etc.
  • Supports 1000+ file formats recovery with a high success rate and without any quality loss.
Free Download Free Download Free Download Learn More >
hard drive recovery

How to Open Terminal and Use Terminal on Mac

Wondershare Recoverit Editorial Team

Oct 30, 2026 • Filed to: Solve Mac Problems • Proven solutions

⚡ Quick Answer: How to Open Terminal and Use Terminal on Mac?

Press Command + Space to open Spotlight Search, type Terminal, and double-click the app. Alternatively, open Finder > Applications > Utilities and double-click Terminal. Once open, type a command (such as ls to list files, cd to change directories, or rm to delete files) and press Return to execute it.

⚠️ Be Careful: Commands like rm or sudo delete data permanently without the Trash. If you accidentally lose files while using Terminal, stop immediately and run Wondershare Recoverit for Mac to retrieve them.

When people heard the word Mac Terminal, they get scared thinking that using Terminal is very hard. But the truth is quite the opposite. Once you get a hold of Terminal commands, it will become easy for you to carry out even the complex task on Mac easily. So, in this article, you will learn how to open and use Terminal on Mac.

Part 1. Basics of Mac Terminal:

Just like the Windows command line, Mac Terminal is the command-line system that helps the users to take control of the operating system and make changes in it. The best thing you can do to learn using Terminal is to start using it. The most important thing you need to learn is commands.

All you need to do is to type the command and hit Return to execute it. Every command has three components, the command itself, an argument, and an option. The command is self-explanatory; the argument tells the command the source where it should operate and the options work as a modifier for the output.

🔍 Anatomy of a Terminal Command

Component What It Does Example
Command The program or action to run, e.g. mv to move files. mv
Argument The source and destination the command operates on. file.txt ~/Documents/
Option A modifier that changes how the output behaves. -v, -R

For example, if you want to move a file from one folder to another, the command used will be- mv. Then type the location where the file exists and add file name and location where you want to move it.

While you are using the Mac Terminal, you should know about the basic rules too.

  • Every single character matters in the terminal command, even spaces, and commas.
  • You can't use a mouse or Trackpad inside the Terminal. Therefore, you'll have to navigate using the arrow keys, and Return key.
  • Commands are executed inside a location, so if you don't specify a location in the command, it is automatically set to the recent or previously specified location.

Essential Mac Terminal Commands Cheat Sheet

Command Function
ls List the contents of a particular directory.
cd Change to another directory.
sudo Authenticate as a superuser to gain extra security privileges.
defaults write -g ApplePressAndHoldEnabled -bool false Disable the pop-up accent window while typing.
defaults write com.apple.finder AppleShowAllFiles -bool TRUE Show hidden files in Finder.
history Show the terminal command history.
defaults write com.apple.SoftwareUpdate ScheduleFrequency -int 1 Check for macOS updates automatically.

If we start learning, the macOS terminal commands won't come to an end. So, in this article, we will only learn using some basic commands like deleting files, show hidden files, change folder permissions, etc.


Part 3. How to Open Terminal on Mac:

There is no doubt that Terminal is a handy tool for Mac users. Therefore, it is vital that you know all the ways there is on how to open a terminal on Mac. Here are all the ways that are used to open Terminal. Take a look and use the one which suits you best.

6 Ways to Open Terminal on Mac

Method 1: Using Spotlight Search

  1. Click the Spotlight search button in the menu bar, or press Command + Space.
  2. Type Terminal in the search field.
  3. Double-click the Terminal result to open it.

open-terminal-from-spotlight-search

Method 2: Using Finder

  1. Open Finder and click Go from the menu bar.
  2. Choose Utilities to open the Utilities folder.
  3. Double-click the Terminal application.

open-terminal-from-finder-utilities

Method 3: Using the Applications Folder

  1. Open Finder and click Applications in the left side panel.
  2. Expand the Utilities folder.
  3. Double-click Terminal to launch it.

open-terminal-from-finder-applications-utilities

Method 4: Using Launchpad

  1. Open Launchpad from the Dock, or press the Fn + F4 keys.
  2. Look for the Other folder, which contains Terminal by default, or type Terminal in the search box.
  3. Click the Terminal icon to open it.

open-terminal-from-launchpad-other

Method 5: Using Siri

  1. Open Siri from the menu bar or the Applications folder.
  2. Say "Open Terminal" and Siri will launch it for you.

open-terminal-with-siri

Method 6: Create a Terminal Shortcut

  1. Right-click the Terminal application in Utilities or in the recent applications list in the Dock.
  2. Hover over Options in the pop-up window.
  3. Choose to Keep in Dock, Show in Finder, or Open at Login.

create-shortcut-keep-terminal-in-dock

All of these methods are simple and easy. So, pick whichever is more comfortable and you will be able to access Terminal with just one click.


Part 4. How to Use Terminal Commands on Mac:

Here is a list of some common commands used in Terminal. These commands will provide you a short and precise method to carry out the task.

Common Terminal Tasks and How to Run Them

1. Delete Files Using Terminal

Use the rm command to permanently delete files and folders without the Trash.

  1. Launch Terminal and type cd ~/Desktop to move to the desktop directory.
  2. Type rm MyFile.rtf (replace MyFile.rtf with your file name) and press Return. The file is gone forever.
  3. To delete multiple files, leave a space between file names, e.g. rm file1.txt file2.txt.

2. Open Finder from Terminal

The open command lets you open Finder even when the OS is acting up.

  1. Type pwd to print the working directory path (e.g. /Users/admin).
  2. Type cd to change directories as needed.
  3. Type open . and press Return — a Finder window will open in the current folder.

3. Show Hidden Files with Terminal

  1. Run defaults write com.apple.finder AppleShowAllFiles -bool TRUE.
  2. Run killall Finder to restart Finder and apply the change.
  3. To reverse the process, change TRUE to FALSE and run killall Finder again.

4. Empty Trash Using Terminal

  1. Type sudo rm -R (do not press Enter yet) and control-click the Trash icon to open it.
  2. Select the files you want to delete and drag them into the Terminal window.
  3. Press Enter and enter your admin password. Press Enter again — the Trash files are deleted.

empty-trash

5. Change Folder Permissions

Use the chmod command to control read, write, and execute permissions for user, group, and others.

  1. Type cd and drag the folder whose permissions you want to change into Terminal to copy its path.
  2. Type ls -l to reveal all subfiles, subfolders, and their permissions.
  3. Type chmod 755 /bin (adjust the number and path as needed) to apply the new permissions.

change-permissions

6. Repair Disk

  1. Type diskutil repairVolume / to repair the startup disk.
  2. For other volumes, run diskutil repairVolume /Volumes/ExternalBackups/ and press Return.
  3. Wait for the repair command to resolve all issues on the disk.

Pro Tips for Using Terminal on Mac

  • Change screenshot format: Run defaults write com.apple.screencapture type JPG to switch screenshots to JPG, PNG, TIFF, or other formats.
  • Create a recent applications folder: Run defaults write com.apple.dock persistent-others -array-add '{ "tile-data" = { "list-type" = 1; }; "tile-type" = "recents-tile"; }';killall Dock to add a recents tile to the Dock.
  • Flush Mac memory: Run sudo purge and enter your password to clear the Mac memory.
  • Repair the file system: Run fsck -fy and press Return to check and fix disk consistency.
  • Keep your Mac awake: Run caffeinate, or specify a duration such as caffeinate -t 3600 to keep it awake for a limited time.
  • Recover lost files: If a command mistake costs you data, Recoverit for Mac can retrieve lost or deleted files with one click.

Part 5. Tips for Opening and Using Terminal on Mac:

Here are some tips for opening and using a Mac terminal so that you can avoid common mishaps.

  • To change the default format of an image screenshot, type - defaults write com.apple.screencapture type JPG and hit Return. You can change to format to any format like PNG, TIFF, etc.
  • To create a recent applications folder on Mac, type- defaults write com.apple.dock persistent-others -array-add '{ "tile-data" = { "list-type" = 1; }; "tile-type" = "recents-tile"; }';killall Dock. As you control-click the Dock item, you'll see the recent application, documents, servers, and favorite items all in one place.
  • To flush the Mac memory, type- sudo purge and you might be asked to enter a password. Enter the password and the Mac memory will be erased.
  • To fix your Mac, you can use File System Consistency Check, i.e. fsck, and repair the file system on Mac. Type- fsck fy and hit the return key. A bunch of code will appear on the screen until the check finishes and you will see the results on the screen in a while.
  • Use caffeinate to keep your Mac from falling asleep as- caffeinate and hit the return key. You can also specify the amount of time in seconds like –t 3600 or –t 24000 to keep your Mac awake for a limited time period.

If you somehow end up making a mistake while using the Terminal and end up losing your files, then you still have an option to get them back. If you use Recoverit data recovery software for Mac, you can retrieve all files that are lost or deleted from Mac with just one-click.


Closing Words:

In this article, we learned how to open and use Mac Terminal in detail. As the commands and use of Terminals extend to the limit of words of this article, you can always learn a new thing. All the things you have learned from this guide will surely come in handy. And if you happen to fall prey to data loss situations, then you will still have access to Recoverit Mac Data Recovery to get the important files back on the device. Recommend this Mac Data Recovery tool to your friends and family and help them to retrieve their lost or deleted files.

Home > Resources > Solve Mac Problems > How to Open Terminal and Use Terminal on Mac
Get Recoverit Get Recoverit