- Mac Set Shortcut For Terminal
- Mac Commands For Terminal
- Mac Open Terminal Hotkey
- Macos Terminal Keyboard Shortcuts
Visual Studio Code lets you perform most tasks directly from the keyboard. This page lists out the default bindings (keyboard shortcuts) and describes how you can update them. Note: If you visit this page on a Mac, you will see the key bindings for the Mac. If you visit using Windows or Linux, you will see the keys for that platform. By pressing the hotkey, the window opens or closes. This is similar to the old Visor app. In its simplest form, it's a system-wide terminal window that you can open with a hotkey. ITerm2 allows you to assign multiple hotkeys to a single profile or even a single hotkey to multiple profiles. You can also assign the double-tap of a modifier. I find the behavior of the mac to be very practical, because all the most common shortcuts use Super, and the famous copy shortcut doesn't overlap the famous SIGINT shortcut. Most terminal apps react to Ctrl-. shortcuts, and they mostly overlap with 'standard' shortcuts. Keyboard shortcut to open terminal in mac OSX? Karabiner-Elements (10.12 and later) Karabiner stopped working in 10.12 due to changes in the kernel architecture, and Karabiner was rewritten as Karabiner-Elements which uses a new JSON format for the configuration files.
Humanity should be grateful for the invention of Mac hotkeys. They probably saved us thousand years of time if put together. There is something addictive in using shortcuts - the quickness, the feeling of a keyboard, the geeky confidence in your fingers when you realize “hurray it works!” Once you get hooked on shortcuts, you’ll never go back to clicking again.
Basic Mac hotkeys combinations
1. Quit all apps
Sometimes an app that you thought you quit is still secretly running in the background. When your Mac lags and you need some fresh memory, you may choose to quit all apps. You probably heard of Force Quit (Cmd + Option + Esc), but it’s a too long way to do it.
Quit many apps in a row: Cmd + Tab
Then, holding down Cmd press Q to cycle between apps you need to close.
2. Delete a file completely
Dragging files to the Trash? Wait, this is not the only option. Here’s a shortcut to quickly delete unwanted files on a Mac, bypassing the Trash. Caution: there’s no way back.
To completely delete a file: Option + Cmd + Delete
Did you know, the Command key ? symbol was borrowed from a road sign that is used across Scandinavia? Its original use is to denote tourist attractions. Early Mac models had Apple key instead of Command, but it later was changed as Steve Jobs feared that there would be too many “apples” in the OS interface.
3. Copy and paste a screenshot directly
Cmd + Shift + 4 is an old classic way to make a screenshot on a Mac. But here comes the combination to take your screenshotting skills to the new level. Normally you would make a screenshot, pick it from your desktop, and only then paste it to the new location. It appears, all this time you could do it easier.
To copy-paste a screenshot: Shift + Control + Cmd + 4
4. Quickly switch to the desktop
Sometimes your screen is so obscured by windows it would take years to click through to the desktop. Thank goodness, there is a Mac keystroke combination designed for people like us: the folks who are drowning in an ocean of windows.
To remove window overload: Cmd + F3
5. Open Spotlight
Spotlight, your Mac’s internal search engine, can make your life 1000% easier. It finds files faster than Finder and intuitively predicts what are you after. To open Spotlight right on the spot (sorry for the pun), use this magic combo.
To launch Spotlight search: Cmd + Space bar
Cool shortcut keys for Mac
1. Invert display colors
A truly psychedelic key combination. This shortcut inverts all the colors on your Mac's screen to their opposites. Try it, and your world will never be the same. On the flip side, you can find a few practical applications for this command, for example, to adjust your screen to different lighting.
To invert colors on screen: ?md + Option + F5
2. Restore a recently closed tab
This one can be a real savior if you accidentally closed an important tab in a browser, like that pancake recipe or payment confirmation. There’s an easy Mac keyboard shortcut to restore it.
To restore a closed tab: Cmd + Shift + T
3. To shut down your Mac instantly
No, the following Mac shortcut is not about the force shutdown. It’s used when you need to quickly close all dialog windows and shut down your Mac in a legit way. Learn this one, quickly finish your work and finally go outside.
To quickly shut down a Mac: Control + Option + Command + Eject
4. Mac hot keys to invoke Siri
Among all Mac keyboard commands, this is the easiest. Since Siri’s arrival to macOS we got used to talk to Siri about weather and even ask her to play our favorite tracks on Mac. If you are using macOS Sierra or higher, you’ll enjoy the ability to summon Siri using just one hand.
To launch Siri: Cmd + Space bar
A shortcut to free up space on your Mac
Well, not exactly a shortcut, but indeed the quickest way to get more storage on your Mac.
Download CleanMyMac + Install + Click Smart Scan
This combination of actions will free up dozens of gigabytes of space taken by garbage: unwanted files, system junk, app leftovers, etc. CleanMyMac removes about 54 GB of junk on an average Mac. Try and see how it cleans your Mac.
CleanMyMac is available for a free download here.
Finder shortcuts
Finder is quite a resource-demanding tool. When you open a new Finder window it usually takes some time. For quicker access to your main destinations like Applications or Desktop, you can use the following shortcut combinations.
To quickly access Finder folders:
Cmd + Shift + A (for Applications)
Cmd + Shift + U (for Utilities)
Cmd + Shift + D (for Desktop)
Chrome shortcuts
Having hundreds of opened tabs in a browser has become a widespread syndrome nowadays. Closing tabs with a mouse is not only frustrating but also may freeze up your browser. Using a direct shortcut makes this job easy as a morning walk.
To close a current tab in Chrome: Cmd + W
To close a Chrome window: Cmd + Shift + W
To open a new Chrome tab: Cmd + T
Psychologists say you have to do something at least 3 times to put it in your long-term memory. Attach small sticky notes to the outlines of your Mac’s screen with 3 or 4 shortcuts you really want to master. Then, leave it all to your fingers.
Mac shortcuts for documents
1. Copy text without formatting
You want to copy a piece of the text, but the old formatting drags along with it. Now you spend more time formatting rather than actually creating a text. To strip the text from old styling, use the following Mac hotkeys combination. A very good one to stretch your fingers.
To paste text without formatting:
Hold down Shift + Option + Command and hit V
2. Paste special symbols and emojis
Probably this is the easiest documented shortcut key for a Mac. To enter special symbols, like those lamdas, tildas, and alfas, you need to press just one key. For instance, if you need to type a modified E, hold down the E key for one second and then choose among available variations that appear.
To enter an alternate character: Hold down the character key
To paste emojis in the text: Press Control + Command + Space
3. Enter a strikethrough text on a Mac
You won’t believe, but 8000 people are googling how to do a strikethrough text on a Mac everyday. Although some applications don’t support it, this combination well works in TextEdit and Word. Now you can use it in every second line to add some roughness to your writing.
To apply strikethrough formatting: Cmd + Shift + X
4. Quickly print documents
The next combination works for most apps that allow printing. You don’t need to figure out where the print dialogue is located in every case. Just memorize this quick combination and send your files to print from anywhere.
To invoke a print dialogue: Cmd + P
Mac shortcuts to delete many files at once
There comes a time when you need to do a spring cleaning on your Mac: sort out old garbage, move photos to an external drive, or clean up your old downloads. It is time-consuming and takes an immense willpower simply to start. But lucky you are: there are a few shortcuts to remove large heaps of files as quickly as if you had a machete.
To select folder contents: Cmd + A
To delete a group of files after selection: Cmd + Delete
To empty the Trash: Cmd + Shift + Delete
If you’ve got many files left after backing up, this will save you a good deal of time moving them to the Trash bin.
To save you from a headache, there are apps that will do the mundane deletion job in an instant. CleanMyMac is perhaps the most reliable one. It has a tool that specifically searches for Large & Old files on your drive for a quick cleanup. CleanMyMac is available for a free download. So, check it out.
This was our take on most useful keyboard shortcuts for Mac. Thanks for reading. Below you'll find a few more links about Mac and productivity.
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:
Mac Set Shortcut For Terminal
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.
- 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.
PWD
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.
LS
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.
CD
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.
Examples:
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:
CD
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.
Mac Commands For Terminal
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
Mac Open Terminal Hotkey
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
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
Bonus
That’s all you need to know to become an expert in Terminal.
Macos Terminal Keyboard Shortcuts
In the end, I want you to have some fun and watch a Star War movie. Start the Terminal and paste the following:
telnet towel.blinkenlights.nl
Enjoy!
Topics: