Skip to main content

MAC OS Tricks and Shortcuts

I am learning about Mac OS, so thought to compile all the stuff I learn in this post.

How to run *.sh scripts in mac?

*.sh files are opened in a text editor by default, but to execute a script in Terminal when you click it, you have to do the following:
  • Change the extension of the script to *.command (i.e. -> file.command) 
  • Make the file executable by running the following command: chmod +x file.command 

How to capture the screen in mac and save it as an image (on the desktop)? 

  • Command+Shift+3: Captures the full screen (or screens if multiple monitors). 
  • Command+Shift+4: Let you select the area on the screen to be captured. 
  • Command+Shift+4, then space bar and then select a window: Captures the screenshot of the selected window. 
In order to capture the screen in mac and copy it to the clipboard for the use in another program, use the above keys in addition to the “Control” key.

How to format your pen drive to copy large files from Mac to Windows?

You might have come across the problem of copying large volume files into pen drives formatted in Windows. This can be overcome by formatting your pen drive under Mac. Please follow the following steps (note that this might not work with older versions of Windows and Macs):
  1. Launch Disk Utility (/Applications/Utilities/). 
  2. Connect the drive you wish to format for dual compatibility to the Mac. 
  3. Click the drive name on the left side list in “Disk Utility”, and then click the “Erase” tab. 
  4. Click the pulldown menu alongside “Format” and select “exFAT”. 
  5. Optionally, give the drive a name. 
  6. Click the “Erase” button to format the drive for Mac & Windows PC compatibility. 

How to convert a colour pdf into black & white or gray?

Open the pdf file in Preview. Now, Click “File” -> “Duplicate” (This will open the document in a new window) -> Goto “File” -> “Save” -> In “Quartz Filter” select “Black & White” or “Gray Tone” depending on the need and save the file.

Mac Text delete shortcuts 

  • Deleting text in front of the cursor with the regular Delete key can be done by holding down the Function, or fn key while pressing it. 
  • You can also do this by pressing Control + D
  • You can delete the entire word behind the cursor by pressing Control + Delete or Option + Delete
  • You can delete the entire line of text or paragraph behind the cursor by pressing Command + Delete.

How to change where the screenshots are saved in Mac:

defaults write location ~/Pictures/ killall SystemUIServer

Mac OSX EI Capitan clean installation - Mashable

How to initiate a VNC session in Mac:

Open the terminal and enter the following
open vnc://

or from finder,
Go -> Connect to server / Command+k
Type in the same "vnc://..." as above (without the "open" part). You can save connection shortcuts here also.

How to create a .bashrc file in Mac

Create a .bashrc file in your home directory.
Add the following to your ~/.profile file
[pre class="brush:bash"]if [ -f ~/.bashrc ]; then . ~/.bashrc; fi[/pre]


Popular posts from this blog

How to Safely Uninstall Python from Mac OS X

Mac Laptops comes with Python pre-installed, but if you install another version of Python probably from it might interfere with the default Python installation. Thus it is recommended to install other Python versions through Homebrew or mac ports.

Advantages and Disadvantages of Electro-oculography (EOG)

In the previous post we looked at what is EOG? In this post we will look at the advantages and disadvantages of EOG.

What is your Lucky Colour?

Colours and You
Which colour can bring you luck and enhance your day? This can be identified by calculating the birth number,