The Terminal is a powerful macOS tool that let you get under your computer ’s hood and tweak the way it make in all manner of ways , from simple visual change toupdating your Macand keeping it secure . moot what it can do , it ’s a very helpful app to have at your disposal .
Yet many Mac users either do n’t know how to use the Terminal or do n’t even know it exists . And granted , it ’s not for everyone — its all-encompassing powers mean that things can go improper if you do n’t experience what you ’re doing .
But that ’s where our guide come in . We ’ve put together our good tips on how to use the Terminal and get the most out of it . We ’ve also included some of our favorite Terminal bidding , all of which can meliorate your Mac experience . Let ’s get started .
How to open the terminal
This is probably the most authoritative part of this scout since many the great unwashed do n’t acknowledge that the Terminal even exist . To open up the Terminal , all you need to do is overt theFinderapp , selectApplicationsin the lefthand sidebar , and then open theUtilitiesfolder at the bottom and bump the Terminal app . Alternatively , you could afford the Spotlight hunting corner by pressingCommand + Space , typing “ Terminal , ” then choose the top result or pressingReturn .
Terminal is an interface through which you issue text command to your Mac . Once you type a command , Terminal will respond in one of three ways : recognize and accept those commands , not recognize them , or prompt you for further input . It ’s that simple .
The commands below will help familiarise you with how the Terminal ferment and what you’re able to utilize it for in your everyday life .
Prevent your Mac from sleeping
This command accomplishes one very elementary job : maintain your computer alive for a point of clock time . Just launch the Terminal and character in “ caffeinate , ” and your Mac wo n’t go to nap until you fold that Terminal window . you may also coiffe a timekeeper by typecast “ caffeinate -u -t ” and then how long , in seconds , you want to prevent your Mac from sleep .
For example , type “ caffeine -u -t 120 ” would keep your Mac alert for 120 seconds ( or two minutes ) .
Change screenshot formats
The macOS operating arrangement makes it really easy tocapture screenshotsof your whole screen ( Command + Shift + 3 ) or just part of your blind ( Command + Shift + 4 ) . However , it always hold open those screenshots to your desktop as PNG file cabinet . That ’s not always a bad thing , but sometimes you might want to lay aside a screenshot as a different Indian file type , such as JPG .
as luck would have it , there ’s a Terminal command that can solve that problem : just type : defaults publish com.apple.screencapture character JPG
This command allow you to change the filetype your screenshots will be pull through as — in this example , we ’ve used JPG . you’re able to exchange it back at any time by type the above program line and exchange JPG with PNG , making the full dictation : defaults publish com.apple.screencapture type PNG
Show detailed file paths
By default , when you open a brochure in macOS , the top of the window will show the name of the folder but not where it is . For instance , open up your Pictures folder , and the top of the finder window will just say Pictures , not users / yourname / word picture . This can be a little irritating , specially when you ’re moving leaflet around or dig through folders trying to find a particular single file .
To show detailed file paths , open Terminal and eccentric “ defaults write com.apple.finder _ FXShowPosixPathInTitle -bool YES ” — then , pressReturn .
This terminal bid picture the full path of a leaflet in the Finder window of that folder . If nothing else , it ’s a helpful way to get an mind of how your files are format and keep your Mac nice and organized . Undoing this change is just as easy as typing out the above command again and substitute YES with NO .
Show hidden files
Sometimes , you just need to excavate into the grit of macOS to fix some problem or another , and that will require accessing file that your Mac would prefer you left alone . By default , most sensitive files and folders are hidden from eyeshot , admit from Spotlight and Siri searches . With the right terminal command , you could unclothe back the drape and peer into the morose reaches of your Mac .
To do so , typewrite the following statement into Terminal : defaults write com.apple.finder AppleShowAllFiles dependable
The above bid reveals all of your hidden system files , so ensure you know what you ’re doing before you get going messing around with them . If you ’d favour those files go back to being hidden , just re - enter the above bidding but trade reliable with FALSE .
Update macOS
If , for one understanding or another , you could’tupdate your Macusing the System preferences app , you could use the Terminal . In a newfangled Terminal window , type the following : softwareupdate -i -a . This will download and instal any updates to your operating system that are available . notice that this does not update individual apps .
If you or else desire to see what macOS updates are useable before installing them , typecast “ softwareupdate -l ” ( that ’s a small letter litre , not an uppercase i ) . This will display any macOS updates with an asterisk to the left of each update ’s name . To install an update , eccentric “ softwareupdate -i [ name ] ” — [ name ] is replaced by the accurate name of the update , as number in Terminal . If there are infinite in the update name , enfold the entire phrase in single citation Mark . For example , you could typecast : ‘ softwareupdate -i macOS Sequoia 15.0.1 ’ — the update will begin when you pressReturn .
Change Dock spacing
you could better direct your Mac ’s Dock by contribute spacers in between your apps . To do this , open Terminal and typewrite the pursuit :
defaults compose com.apple.dock unyielding - apps -array - add ‘ { “ tile - type”=”spacer - roofing tile ” ; } ’ ; killall Dock
Once you pressReturn , your Dock will restart , and a spacer will be add to it when it reappears . Type the command again to tot another spacer ( do this as many times as you care ) . Feel free to move the spacers around the Dock to aggroup app icon together . To remove a spacer from your Dock , right - click it and selectRemove from Dock .