Top 7 of The Useful Mac Terminal Commands You Should Know

The terminal is a wonderful app for Macs that allows you to get a number of tasks done on your machine without requiring you to interact with the graphical user interface. In a Terminal window, you can just type a command, it will be executed and its actions will be performed on your Mac.

Now that you know Terminal is a great command line tool, you might want to learn some of the commands that you can use this command line tool. In the post below, we have compiled some of the great Mac Terminal commands that you should know as an Apple Mac user.

Burning Disk Images to DVD

If you don’t already know, Terminal can help you burn a disk image to a DVD on your Mac. This won’t work if your Mac doesn’t have a DVD drive, though.

Open Terminal and type in the following command and press Enter to execute the command. Replace mydiskimage.img with the name of your disk image.

hdiutil burn ~/mydiskimage.dmg

Useful Mac Terminal

It should get the disk image burned on your DVD.

See more: Best Free DVD Ripper

Convert Files to Web Pages

If you have a file on your Mac that you would like to convert to a web page, i.e., HTML format, then Terminal can help you do that with a single command as follows:

textutil -convert html ~/filename.txt

Useful Mac Terminal

In the above command, replace filename.txt with the file that you wish to convert to the web page format.

Get Easy Access to the Recent Apps in the Dock

You can now add a section in your Dock that shows your recently opened applications. That way you can quickly get access to an app that you have recently launched on your Mac.

Type in the following command into a Terminal window and press Enter.

defaults write com.apple.dock persistent-others -array-add \
'{ "tile-data" = { "list-type" = 1; }; "tile-type" = "recents-tile"; }' && \
killall Dock

Useful Mac Terminal

It should add a new section to the Dock on your Mac where you can see your recent apps.

Divide Dock Icons with a Divider

If you would like to divide the apps in the Dock in their sections, then you can use the following command to do that:

defaults write com.apple.dock persistent-apps -array-add '{"tile-type"="spacer-tile";}' && \
killall Dock	

Useful Mac Terminal

What the command will do is it will create a blank space in the Dock that helps you separate your apps there.

Changing the Dock Settings Back to the Default

If you have played around with the Dock on your Mac a little too much, you might want to set the settings back to default so it looks like what it did when you first booted up your Mac.

Open Terminal and type in the following command and press Enter to reset the Dock.

defaults delete com.apple.dock && \
killall Dock	

Useful Mac Terminal

Read also: How to Auto Hide and Show Dock on MacOS

Close the Finder App

You will see the quit option in all of the apps on your Mac but the Finder is the only app that doesn’t have this option. Fortunately, you can have that option added to the Finder using the following command in Terminal:

defaults write com.apple.finder QuitMenuItem -bool true && \
killall Finder

Useful Mac Terminal

The Finder should now have the quit option.

See more: How to Force Quit Mac Apps in macOS

Hide and Unhide Icons on the Desktop

If you would like to hide but not delete all of the icons on your Mac’s desktop, then you can do so using the following command in Terminal:

defaults write com.apple.finder CreateDesktop -bool false && \
killall Finder	

Useful Mac Terminal

All of the icons on your desktop will now be hidden. Your desktop should now be completely empty. If you would like to unhide the icons and to bring them back, use the following command in Terminal:

defaults write com.apple.finder CreateDesktop -bool true && \
killall Finder

Useful Mac Terminal

The icons should now be back on your desktop. So, above were some of the useful commands you could use in the Terminal app on your Mac. Let us know if these commands helped you achieve more on your Mac!

Read also: How to Show Hidden Files on Mac

5/5 - (3 votes)
Solomen
Solomen

Solomen is the founder of MrHow.io, and he is happiest when working with technology and able to help others. In his free time, he often listens to Baroque music, swims or runs. Feel free to contact him on social media!

Subscribe
Notify of
guest

0 Comments
Inline Feedbacks
View all comments
MrHow - Tutorials Related To Windows, Mac, iOS & Android
Logo