How to Open Terminal On Mac?Terminal allows you to access the UNIX part of mac OS. So you can run scripts, manage files and edit settings using text commands. To launch the Terminal application, we can use Launchpad, Spotlight or Finder.
LaunchpadClick on the silver rocket Launchpad icon > Click on ‘Other’ folder > Click on ‘Terminal’ app to launch the command prompt of Mac.
SpotlightOpen the magnifying glass Spotlight icon in the dock or you can use shortcut cmd + space bar. Type ‘Terminal’ into the search box > Terminal will appear in the search results, click it & proceed with the command prompt.
FinderFinder organizes your files, folder, apps, documents and helps you to locate when you misplace them. Once it’s opened, locate ‘Applications’ folder in the left panel. Now, click on ‘Utilities’ & scroll down to find ‘Terminal app > Double-click to launch it.
Basic Utilities You Will Use On A Regular Basis
How To Use Terminal On Mac?A command consists of three elements:
- The command itself which calls a particular tool.
- An option which modifies the output.
- An argument which calls the resource on which the command will operate.
mv ~/Desktop/MyFolder /Volumes/Backup
Here are 10 Mac Terminal Commands:
Want to See Hidden Files/FoldersEnter the following command to see hidden stuffs:
defaults write com.apple.finder AppleShowAllFiles -bool TRUE
Download Files Without Using BrowserTerminal can help in downloading files when you don’t want to use web browsers. If you have the URL of the file you wish to download, just enter the following commands.
First Command: Set the Locationcd ~/Downloads/
Second Command: Download Filecurl -O (Enter the URL of the file you want to download)
Keep your Mac AwakeJust use the command and specify an elapsed period of time you want your system to be active!
Run: caffeinate – u – t 5400 (5400 are the number of seconds)
DittoThe most popular command used in OS X is Ditto. It’s helps in copying huge amount of data from one folder to another.
Ditto – v / Old Folder / New Folder
At the place of ‘old folder’ and ‘new folder’ you have to add the paths of the source and destination of the files. You can see each file in the terminal window as they’re copied from one place to another.
Change Location for ScreenshotsIf you don’t want your system to save screenshots on your Desktop, you can change its location using terminal application. To do so, run the following commands:
- Type: defaults write com.apple.screencapture location (path of the folder where you want screenshots to be saved)
- Click Return
- Type: killall SystemUIServer
Change Screenshot File FormatUsing this Mac command line, you can change the default PNG format into PDF, JPEG and more. In the following example we’re changing the default format to PDF.
Execute the following command: defaults write com.apple.screencapture type PDF
To revert the changes, run the same command again and type PNG in place of PDF.
Make your Mac to Automatically Restart After a CrashThe following command can help you to reboot your system automatically.
Type: sudo systemsetup – setrestartfreeze on
Securely Erase DataWhenever you delete data from your system, it leaves fragments of files all over your hard disk drive. In case you want to safely remove all the remaining fragments, then you can execute the coming command.
diskutil secureErase freespace 3 / volumes / name-of-drive
At place of ‘name-of-drive’ you have to type the name of the drive you want to erase data from.