How To Make A Terminal Program For Mac

.inputrc is a bash thing, it has nothing to do with the Mac Terminal as the headline says. If you’re not using bash, this won’t help. If you are using bash and using iterm2 or some other terminal program or ssh’ing, it will. Open Finder and click on the Application option from the left side panel. Expand the Utilities folder and there you will find the Terminal option. Double click on it and the Terminal will open up. If you have a shortcut for the Applications folder on Mac, then you can directly locate the Terminal application from the list. Related: How to Customize Your Mac’s Terminal for Better Productivity. Terminator has been around for years and offers some features you won’t find in other terminal apps. One such feature is its drag-and-drop support, which lets you drag and drop a folder or file from Finder into the terminal window.

  1. How To Use Terminal On Mac
  2. How To Make A Terminal Program For Mac Free
  3. Force Quit Program Mac Terminal
  4. How To Make A Terminal Program For Mac Os

Open Terminal, which is in the Utilities folder of your Applications folder. Type or paste one of the following commands in Terminal. These assume that the installer is in your Applications folder, and MyVolume is the name of the USB flash drive or other volume you're using. The Terminal is generally reserved as an environment for advanced configuration of your Mac, but there are those who resort to it on a regular basis and use it in conjunction with OS X’s graphical interface to make optimal use of the system.

Terminal is not for mere mortals, you're probably thinking. App to draw graphs mac. 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

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:

sudo write /Library/Preferences/ 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:
On macOS Sierra and higher macOS versions, you should use a different command:

nc 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 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 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.

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 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!

These might also interest you:

If you work on Macs for a reasonably long time, eventually you will encounter problems which require the Terminal app. In its core, macOS is a UNIX system, and some troubleshooting requires doing things that are not available from GUI (graphical user interface).

I know that for non-technical folks Terminal sounds too intimidating. Do not fear, though, coz I’ll teach you how to use Terminal as a pro in less than 10 minutes.

There are multiple ways to open Terminal on Mac, and the best approach is to open it with Spotlight Search. Press Command (⌘) key and hit the Space bar. In the Spotlight Search bar type “terminal” and hit Enter. This will open Terminal in the current user directory.

I know that a smart reader like you would count the keystrokes and say: “Hey, Al, I have to hit the keyboard 11 times. You promised 4. What happened?”

Well, first, if you hit Command and Space bar, and then type just “t” it is possible that autocomplete function in Spotlight will display Terminal and all you need to hit Enter to start the app. And second, we’re not there yet. We still have some hacks to learn.

I promised, and I will deliver. But now, let’s answer the question that many people ask.

How to open Terminal in the current directory?

Let’s assume you were working with the Finder. Finder is the built-in app which allows users to browse disks and folders on Mac. If you not familiar with the Finder or need a refresher read my post about it:

For instance, I created three folders in my Desktop: TestFolder1, TestFolder2, and ScreenShots. And I want to open the Terminal in TestFolder1 directory.

The first approach is to open a Terminal, type cd, and hit Space. Then drag the folder to the Terminal window. This will paste the full path of the folder in the Terminal app. Now if you hit Enter, the current directory will change to TestFolder1.

This technique is also useful when you need to work with the file. For instance, if I had a text file TestFile.txt on the Desktop and I want to open it with built-in nano editor all I need to do is type “nano” and then drag the file to the Terminal window.

However, there is a better way to open the current directory.

How To Make A Terminal Program For Mac
  • Select the folder you want to open in the Finder.
  • Click on Finder menu and scroll to Services item.
  • When Services item expands click on New Terminal at Folder.

And this, my dear reader, is how you open the Terminal on Mac in 3 clicks: tap on the folder, click on Finder menu and tap on New Terminal item.

But, what if you don’t see New Terminal option in Services menu? There are two possible reasons for this.

Reason 1. The options were not configured yet. To enable both “New Terminal at Folder” and “New Terminal tab at Folder” go to Finder menu, scroll to Services, and then scroll all the way to the bottom and tap on “Services Preferences.”

Make sure the Shortcuts tab is selected at the top of the pop-up window and click on Services item in the left pane. Scroll and find both options under Files and Folders section in the right pane. Make sure that both options are checked.

How to set a shortcut to open Terminal on Mac

After enabling both “New Terminal at Folder” and “New Terminal tab at Folder” options in the Service Preferences add command shortcuts. By default, the shortcut is none.

Click on “New Terminal at Folder” option and the label will change to Add Shortcut. Tap on Add Shortcut label.

With your left hand press Control, Option (Alt) and Command buttons and hold. Then with the right hand, tap on T key and release all keys.

Now, select any folder in the Finder and use newly created Control+Option+Command+T key combination. This is how you will open a Terminal app in the selected directory in 4 keystrokes!

Here’s the second reason why the New Terminal option is not available in Services (and the key combination isn’t working) – Finder does not allow Services on items in the Sidebar (left pane). So, if you want to open Terminal app in Desktop folder from the Finder’s sidebar, it will not work.

But I happened to know a workaround for this issue. Right-click on the sidebar item, e.g., Downloads or Desktop, and in the context menu select “Show in Enclosing Folder.” Using this feature will reveal the folder in the right pane of the Finder.

Now, you can use Control+Option+Command+T key combination (or Finder->Services menu) to open the Terminal.

How to open Finder from Terminal

But how about the opposite? What if I’ve been switching directories in the Terminal and now I want to reveal my current directory in the Finder app?

It’s super easy. Use open command followed by the directory name. There is a shortcut for the current directory in macOS – a dot symbol. So, to open the current directory in the Finder type “open .“, like this:

Basic navigation commands in Terminal

Since you are planning to use the command line, you need to know some basic commands. There are many commands, but all you need is only three.



The first command is PWD, which stands for Print Working Directory. If you type it, the command will print the full path of the current folder, so you will never get lost. By the way, all commands are case-insensitive. It means it doesn’t matter if you type pwd or PWD; the result will be the same.


This command will list the current directory contents. So, if you want to know which files and directories locate under the current folder, use this command.


Next command is CD which stands for Change Directory. Before using this command, you have to know the difference between the relative and absolute paths. If the path of the folder in the command starts with slash ‘/’ then it’s an absolute path, i.e., it starts from the root.

Otherwise, the path is relative, i.e., relative to the current folder.


cd Desktop will change the current directory to the Desktop folder located in the current directory. If the current directory does not contain Desktop, the result would be an error “No such file or directory.”

cd /Library will change the current directory to Library folder under root (in macOS startup disk level).

There are three handy shortcuts for folder names.

One we already know – ‘.’ is for the current directory. Another one is ‘.’ – two dots. It’s a parent folder. So, if you want to go up in directory tree hierarchy type:

cd .

Don’t forget the space between cd and dots.

The third shortcut is ‘~’ – tilde, which is used for the home directory. In macOS, it’s /Users/user_name folder (your user folder). So, if you need to go back to home folder type:

cd ~

Using auto-complete in Terminal

Since now you are almost a command line expert, it’s time for a neat productivity hack.

Let’s enable the autocomplete feature:

  • Open the Terminal app
  • Type nano ~/.inputrc
  • Paste the following on separate lines

set completion-ignore-case on
set show-all-if-ambiguous on
TAB: menu-complete

  • Hit Control+O to save changes to the file
  • Hit Control+X to exit nano
  • Hit Command+Q to close the program

Open a new Terminal window and type:
Hit the Space bar

Now, if you hit the Tab key, the Terminal will show the directory or file name located in the current folder. You can also type the first few characters and hit Tab for auto-complete. Every time you hit Tab, the app will rotate and display the next possible directory or file.

This feature is super useful to increase speed when working with directories and reduce spelling mistakes.

Terminal customization

I don’t know about you, but I don’t like the default app theme: black text on a white background. Fortunately, it is easy to change the look and feel of the program.

  • Start Terminal
  • Goto Terminal menu and click on Preferences
  • Click on the Profile tab and select the one you like. I like Pro.
  • Click on Default button.
  • Close the Preferences window.
  • Close the Terminal.
  • Start Terminal again with the new profile.

Other ways to open Terminal

As I mentioned earlier, there are multiple ways to open the Terminal. I already described the best ways to do it, but here I want to go over the other options quickly.

Open from Dock

When Terminal is open its icon will appear in the Dock (a bar with all icons usually at the bottom of the screen). Right-click on the app’s icon and in the context menu, click on “Keep in the Dock” option.

From now on, you can open Terminal with one click on the icon.

Open from Finder

  • Start Finder
  • Click on Applications folder in the Sidebar
  • Scroll to Terminal app under the Utilities folder
  • Double click on Terminal .app

Now, you know where Terminal is on Mac: in ApplicationsUtilities folder.

Open on Start

If you want the Terminal app to start as soon as you log in, there is a solution for that too.

  • Open System Preferences
  • Tap on Users & Groups pane
  • Click on the Login Items tab
  • Click on the plus icon
  • In the open file, dialog locate the app the same way we did in the previous paragraph

Next time, you log in or restart MacBook the Terminal app will start automatically.

Another way opening from Finder

  • Start the Finder app
  • Click on Go menu
  • Scroll to and click on Utilities item
  • Find the Terminal in the folder and start it

From Launchpad

How To Use Terminal On Mac

Macs have a special place to launch their apps: Launchpad (an icon with rocket picture).

  • Click on Launchpad
  • Click on Other pane
  • Click on Terminal


That’s all you need to know to become an expert in Terminal.

In the end, I want you to have some fun and watch a Star War movie. Start the Terminal and paste the following:

How To Make A Terminal Program For Mac Free


Force Quit Program Mac Terminal


How To Make A Terminal Program For Mac Os