The majority of problems you could encounter with your Mac can be solved easily, but there will always be some that require lateral thinking.
Terminal, in Applications > Utilities, is a program for directly accessing the core of OS X at a command line level. With it you can access and modify all sorts of parameters, but if used incorrectly it can completely mess up your system.
To use Terminal you need an Administrator account, but you should only proceed if you are confident using the utility.
Article continues below
If an app refuses to quit, or your Mac appears to be idle but the processor is working overtime, open Terminal and type top. This lists all running processes; in the %CPU column you will see which one is using all the power.
If it's a process that's not supposed to be running, note its PID number from the PID column and open a new Terminal window. Then, type kill followed by the PID number, press [Enter] and OS X will terminate the thread.
To find out your Mac's IP details, type ifconfig into Terminal, which displays all available network interfaces plus their MAC addresses. Typing disktool -e disk# and replacing the # with a drive number will eject any drive.
You can find a drive's number using System Profiler. Do not attempt to unmount the boot drive. If a networked volume refuses to unmount, type umount -f /Volumes/volumename and replace volumename with the name of the networked drive.
It is possible to delete stubborn files and folders from Terminal, but with one slip or wrong character you can delete the wrong thing, so restart to render the item no longer in use. A handy command is, type defaults write com.apple.Safari WebKitInitialTimedLayoutDelay 0.25 in Terminal and press [Enter], and you can speed up Safari by reducing the time it waits to load data before displaying it.
There are some great free programs that put a graphical front end onto complex Terminal commands, making them easier and safer. OnyX can tweak and maintain your system.
Its cleaning section is useful as it lets you clear out caches, logs and other clutter that may be slowing down your system. Under its Automation tab you will find a series of system-level tasks like optimising the system.
You can also reset the LaunchServices Database, which re-associates files with their creator apps, and reset the Spotlight Index, forcing OS X to re-index all the data on your Mac.
Disk Utility can erase, partition and repair drives, but there are more powerful products. ProSoft's Drive Genius and Data Rescue help you defragment, repartition, analyse and repair drives, and recover corrupted or deleted data respectively. DiskWarrior is often able to recover seemingly dead hard drives.
If a Mac is acting up for reasons that are not entirely clear, try resetting the power management unit, or PMU. This 'clears out' any troublesome settings and forces the Mac to start up from fresh. The exact technique varies between models and details for your specific Mac can be found on Apple's support website.
When resetting a PMU, a Mac should always be turned off, left to cool and have all cables and batteries detached. For towers there is usually a small button on the logic board which is accessed by taking down the side and sometimes removing fans.
On a Mac mini, you do it by plugging in the power cord whilst holding the power button down. On some laptops you need to shut down and disconnect all power and batteries, holding the power button for five seconds then rebooting with power reconnected. Other laptops have an actual reset button, accessed by removing the keyboard or base.