Some Advanced MacOS Stuff / by Joseph Palumbo

I've been using MacOS since 10.4 (Tiger) and it is, by far, my favorite operating system. Here are some of my favorite tips and tricks most new users don't know about.

Change file type for screenshots

Pressing CMD + SHIFT + 3 or CMD + SHIFT + 4 to use MacOS' native screen capture feature produces high resolution, but bulky, .PNG files.

Rather than convert each file one-by-one, you can change the default filetype MacOS uses to save these files.

In terminal, type the following command to switch to .JPG:

$ defaults write type jpg

You can also switch the file type to .TIFF or .PDF if you need to. But the .JPG produces much smaller files with similar quality and resolution.

Encrypt a file openssl from Terminal

You can encrypt a file (image, document, pdf, etc.) directly from the terminal using the openssl command.

Let's say we had a picture we wanted to securely send via email. We can encrypt it using and the openssl cryptography toolkit.

Here is the command:

$ openssl enc -aes-256-cbc -e -in /Users/palumbo/Desktop/white\ jeep.JPG -out /Users/palumbo/Desktop/safe_image.jpg

After running the command, you must also set a password for the file. You then get a password-protected, encrypted file.

To unencrypt the same file, run the same command, but with the -d flag for "decrypt" instead of the -e flag for "encrypt".

openssl enc -aes-256-cbc -d -in /Users/palumbo/Desktop/safe_image.jpg

Notice the -d flag for "decrypt" instead of -e for "encrypt".

Change software update frequency

By default, MacOS only checks for software updates once every 7 days. You can change this using the following command:

$ defaults write ScheduleFrequency int 1

Caffeine from the Terminal

There are times when we don't want out computer to fall asleep. Traditionally I've used a great menu bar app called Caffeine to accomplish this, but I recently learned that the same thing can be done right from the terminal.

The command? caffeinate

As long as the Terminal window stays open and keeps running this command, you Mac will stay awake.

To allow you Mac to go to sleep, close the window or type cntrl + c.

You can also, tell you Mac to stay awake for a specified period of time like this:

$ caffeine -t 3600 &

The ampersand at the end of the command tells Terminal to run it in the background. If you want to end the utility before the specified time, you can do so by issuing the kill command for the reference process ID or simply killall caffeinate.

You can find more information about the caffeinate command by reading the man page or checking out this post on