30 Jan Terminal commands

The terminal is powerful. I remember my dad using dir and chkdsk commands in MS-DOS to explore directories and launch games for us. It lead me to be comfortable using a command-line interface, which seems more complicated than it is. Learning terminal commands can allow you to quickly accomplish actions. But searching the web will mostly give you commands of questionnable or trivial use. The following commands are actually useful for non-developers. @ideafederation if you’re looking for a specific command.

$ killall Dock

Restart your dock. Useful for when you apply custom changes to app icons.

$ sudo Purge

Empty the memory cache, like when your Mac reboots. Useful when your system is slow to respond or experiences lag.

$ caffeinate -u -t 600

Stop your Mac from sleeping for a set amount of time, in seconds.

$ diskutil list

List drives and volumes and gives additional options. Useful for problematic drives.

$ defaults write com.apple.screencapture disable-shadow -bool TRUE

Removes shadows from your screenshots. For a comprehensive set of keyboard shortcuts to capture screenshots, have a look at ideafederation.ca/shortcuts.

Customizations to fit your workflow

Terminal commands can seem a bit geeky and boring to non-developers. Take the time to customize your apps to make friendlier.

Using terminal commands with apps

Your Mac comes with Terminal.app that can be used for terminal commands.

If you’d like something a bit more powerful, you can opt for an app like iTerm 2.

You can also enable terminal commands in quick launcher apps like Alfred or Quicksilver (with a plugin).

Customizing the Terminal.app theme

customize

Open the Terminal.app preferences by using Command-, or from the menu bar. Then, select Profiles. You can modify an existing profile or add one of your own. A few popular or suggested ones :

Consider increasing the font size to 12pt or 14pt. A monospace font (with all characters equal in width) will help with the readability and the precision of your code : seriously consider downloading and using Input Mono. It also includes proportional spacing Sans and Serif variants for those who prefer the typo prevention they can provide.