Terminal is not for mere mortals, you're probably thinking. It's a kind of a sacred knowledge that only geeks and Mac geniuses possess. But if you get through your first command line you'll find it's not that terrifying. In fact, using Terminal is like applying Harry Potter wizardry to your tasks. Once you know the right spells you can break any laws of how applications behave and do some unbelievable things that even the most experienced Mac people can't. Isn't it seducing to try?
We've chosen just a few of Terminal's most impressive features. For more serious take on Mac terminal commands, check out this article. Okay, are you ready to type in your first code? To start the journey, learn how to open Terminal app on Mac: Click Launchpad and then type Terminal in the search bar.
1) Make your Mac talk to you
Basics of the zsh Prompt. When you launch the Terminal app, it displays some useful information. Get 8 of our most popuplar Cheat Sheets in one handy ZIP! Download Now for Free. We make Tower the best Git client for Mac and Windows. We help over 100,000 users in companies like Apple, Google, Amazon, Twitter, and Facebook to easily & productively work with the Git version control system. The Mac Terminal Commands Cheat Sheet - With so many Mac commands, it’s often difficult to remember and use them all. We’re here to help with a detailed cheat sheet of Mac Terminal commands you can use to unlock enhanced productivity on your system. #Mac #MacBook #macOS #Apple #Terminal #Commands #Guide #CheatSheet.
One of the simplest commands which can be very fun, especially when you are planning a prank on somebody. Just type any text in Terminal and your computer will speak it in your Mac's default voice. But there's about 20 voices and intonations to choose from plus the ability to convert an entire text file into speech. So here's a slick audiobook maker at your hand.
Open up Terminal, type in:
say followed by a space and any text you want to hear
2) Customize Login Message
This is what makes Mac more personal and humanized. For example, you can write an inspirational motto or helpful information for other users, if it's a public library computer. It might even be a way to retrieve your MacBook if you lose it — if you set a login message with your contact information. Once again there's much room for pranking other people, but we won't go deep into that.
Open up Terminal, type in:
- Free Cheat Sheet: 'Mac Terminal Commands Cheat Sheet'. Get more power over your macOS desktop with the command line. We require that you verify your email address prior to updating your account. Simply click on the button below and we'll send a quick note to your primary email address confirming this request.
- Terminal Cheat Sheet All the knowledge you need to get up and running on terminals across operating systems.
sudo write /Library/Preferences/com.apple.loginwindow LoginwindowText 'Custom Text Here'
3) Watch Star Wars in Terminal app
In Terminal symbols, of course. This could be the greatest trick which makes no particular sense, but even if just for the coolness alone you should try it. The Death Star, R2D2, spaceships and the rest of the Episode 4 story retold in Terminal graphics will blow your friends away at the party. And there is no sound by the way.
Open up Terminal, type in:
telnet towel.blinkenlights.nl
On macOS Sierra and higher macOS versions, you should use a different command:
nc towel.blinkenlights.nl 23
4) Show hidden files in Finder
This isn't as funny as the previous one, but searching for important files is no joke. With this command, you'll be able to see everything on your Mac, even files which were omitted from standard display.
Open up Terminal, type in:
defaults write com.apple.finder AppleShowAllFiles TRUE
killall Finder
This should summon Finder with previously hidden files shown grayed out.
To reverse this operation (be aware that you may be swamped with lots of irrelevant system files) just substitute TRUE for FALSE in the command line above:
defaults write com.apple.finder AppleShowAllFiles FALSE
killall Finder
5) Pay a visit to a psychiatrist
Funny Mac terminal commands are many. This is a classic Easter egg type of joke macOS developers are famous for. When you're feeling stressful, talking to friendly chatbot will at least make you smile. Strangely enough, this therapy may be actually working because you are asked to verbalize your emotions, by giving them a closer look. And the psychiatrists (the real ones) will confirm that sometimes it works.
Mac Command Cheat Sheet
Open up Terminal, type in:
emacs and then hit Return. Press Esc, then x, and finally type doctor
6) See iTunes songs notification via Terminal app
A clever addition if you normally work with the music on the background. If you fell in love with a particular track from your playlist you don't need to open iTunes to find out the artist's name. It will pop up on your Mac Dock from now on. Though a bit strange this feature isn't included by default because it's really a timesaver.
Open up Terminal, type in:
defaults write com.apple.dock itunes-notifications -bool TRUE
Close the dock using the following command:
killall Dock
7) Play simple games
This is another retro cool feature to cheer you up once in a while. You can play Tetris, Pong, Snake and a dozen of other arcade games. Once you have unlocked these nice hidden toys, you'll surely get to love your Mac more. Prepare to use your arrow keys.
Open up Terminal, type in:
emacs. Press Enter to open it up, press Esc then x. Now you have to type the name of the particular game and that's it.
Game names:
- tetris
- pong
- snake
- solitaire
- 5x5
- landmark
- doctor
What you learn from using Mac Terminal commands is that nothing is really impossible if you're on a Mac. But it's better to start your Terminal experience with these funny little tricks and then go to something serious. This program has a nearly infinite number of magic spells to choose from.
8) Make your Mac faster and more responsive
Okay, this has nothing to do with Terminal. But who wouldn’t want their MacBook as speedy and efficient as back then, on its first day? Surprisingly, this can be achieved easily, Terminal-style way — with aid of CleanMyMac X.
- Remove up to 74 GB of junk from your Mac
- Uninstall unwanted apps completely
- Speed up Mac with maintenance scripts
- Fully clean browsers and messengers
Download the app from developer’s site for free
Hope you found this article helpful, stay tuned for more!
When it comes to learning how to code, you might be worried about mastering the command line.
Not because it’s hard to learn—it’s actually not too difficult once you start—but rather because it is intimidating. It seems like there’s so much you have to know!
That’s why I put together a Unix commands cheat sheet of regularly-used commands in the Unix command line (see below).
This isn’t meant to be some visually appealing infographic, filled with fancy gradients and sexy charts.
Instead, my Unix commands cheat sheet has been created to act as a quick reference guide. You can use it as a way to memorize the basic commands. The only way to ever become comfortable using the command line is to memorize, memorize, and memorize some more.
Luckily, lots of these commands are like their written-out name. They have been created to help, not confuse. So, “exit” does in fact mean to exit the terminal.
Take a look below at the Unix commands cheat sheet, perfect for your Mac terminal.
Embed this infographic on your site
(If you want to save this for later use, right click and “Save As“.)
Again, the only way to ever be a successful programmer is to learn how to work in the command line. It’s unavoidable.
Disclosure: I’m a proud affiliate for some of the resources mentioned in this article. If you buy a product through my links on this page, I may get a small commission for referring you. Thanks!
Here are four quick tips to go along with this infographic:
1. SUDO is your friend, but be careful
“Super do” or SUDO is a very powerful command in the terminal. This command overrides the normal security protections that your OS keeps in place to protect the system from modification.
If you know exactly what you’re doing with it, it’s perfectly fine. However, if you make a small mistake, the SUDO command can also mess up system operations on your machine…which can be an interesting way to spend an afternoon.
So it’s important to be careful with what you’re SUDOing. As this Apple Training guide says, always triple-check your typing when using SUDO.
2. Precise Typing Makes a Happy OS
Another piece of advice is to use the TAB key to autocomplete terminal commands, if possible. This reduces the amount of typos that can screw up something you’re trying to do, so you don’t have to redo your work. It’s the worst having to type a long list of commands over just because your pinky slipped or something. It’s also convenient because it can saving you time by auto-completing.
Also: in most terminals, you can copy/paste commands. So if you’re really, really nervous about making a mistake, it’s okay to type it out in a notepad or word processor, then paste it into the terminal! There’s no wrong way to enter commands into your terminal, as long as they work properly.
3. Use keyboard shortcuts to save time
There are some easy keyboard shortcuts that will help you quickly jump between marks, lines, and pages. Here are a few that will probably become second nature as you work on editing long command strings:
Terminal Cheat Sheet Mac
- Command + up arrow: jumps to your previous mark
- Command + down arrow: jumps to your next mark
- Command + page up: moves up a page
- Command + page down: moves down a page
- Option + Command + Page Up: moves up a line
- Option + Command + Page Down: moves down a line
And that’s only the beginning. Check out Apple’s full list of other terminal keyboard shortcuts to save time navigating around your command string. You’ll become a typo-fixing machine!
Start coding now

Stop waiting and start learning! Get my 10 tips on teaching yourself how to code.
Terminal Command Cheat Sheet
4. Never be afraid to look or ask for help.
Oh no! Your commands didn’t work the way they should. It’s not the end of the world, though.
There are tons of communities, wikis, and message boards where someone just like you probably had the same thing happen to them. So get out of that fetal position and start searching for some assistance on your command line problem: techies love solving problems.
No one will look down on you for trying to do something in the terminal, either. Just remember that we all start somewhere, and mistakes are just a part of life. Keep at it, and you’ll be running terminal commands like a pro in no time.
A Quick Note of Caution
Mac is built on Unix, just like all Linux distributions. Even though the command lines are similar, not all commands will behave the same. This is just a matter of experience with whichever OS you’re using and studying its documentation carefully.
Start coding now
Stop waiting and start learning! Get my 10 tips on teaching yourself how to code.
Additional Information
Luckily, there’s lots of information available online on command line operations. Here’s a few resources that could be helpful:
- Team Treehouse’s “Console Foundations” will show you how to safely perform common operations in a command line environment, like moving files or installing software.
- Lynda.com’s course, “Unix for Mac OS X Users”, goes through all of the workings of the Unix environment as it relates to Mac OS X. This goes a bit further into file permissions and command structuring.
- Lastly, a book by Dave Taylor – “Learning Unix for OS X: Going Deep with the Terminal and Shell”. This is a great resource from starting fresh into working with the Unix terminal on your Mac.
Remember: Practice Makes Perfect
Luckily, like learning a foreign language, the more you use the command line, the better you get at it. (The best part is that unlike a foreign language, you never have to actually speak it aloud. That was always the hardest part for me with languages!)
As my programming Bible (Learn Python The Hard Way) recommends, make flashcards of the commands and study them until you have memorized every single one.
Mac Os Terminal Commands List
Of course, you also should put into practice said commands. Run through the exercises in this command line crash course—basically where I derived all the info for this study guide.
Macos Command Line Cheat Sheet
Start coding now
Stop waiting and start learning! Get my 10 tips on teaching yourself how to code.
Remember—practice makes perfect.
But even professional programmers make mistakes. So take it easy on yourself, okay?
Mac Terminal Commands Cheat Sheet Pdf
Know someone who would want to learn about using the terminal in their OS? Or could they use a Unix/Mac OS X command reference? Share this Unix commands cheat sheet with them!
Mac Terminal Cheat Sheet Pdf
Note: there are affiliate links in this post.
