Subscribe to OSXDaily

Subscribe to RSS Subscribe to Twitter Feed Follow on Facebook Subscribe to eMail Updates

OSXDaily on Facebook

OSXDaily on Google+

Shop at Amazon

Ad

Shared on Facebook

Search Command Line

Command Line

Reboot Mac OS X from the Command Line

Sep 6, 2012 - 8 Comments

Rebooting a Mac from the command line is fairly simple, though most users are best served just using the standard  Apple menu method. Nonetheless, using the terminal command can be an invaluable trick for troubleshooting purposes, remote systems administration and management through SSH, and a number of other reasons. From the OS X Terminal … Read More

Start an Apache Web Server in Mac OS X Mountain Lion

Sep 2, 2012 - 29 Comments

The Sharing preference panel options were changed a bit in OS X Mountain Lion, and while things like Internet Sharing remain, the Web Sharing preference panel was removed. The Apache web server remains bundled with Mac OS X though, but you’ll need to turn to the command line to enable the web server. Additionally, you’ll … Read More

How to Disable “Go To Folder” in Mac OS X

Aug 31, 2012 - 9 Comments

The Go To Folder command is one of the most useful features in the OS X Finder, letting you quickly navigate deep into directory structures without having to click around. But it can also be used to access folders you may not want users to get to, be it /System/ directories or the Library folders. … Read More

Change the Software Update Frequency in OS X Mountain Lion

Aug 30, 2012 - 7 Comments

OS X Mountain Lion automatically checks for software updates once a week, and a notification pops up if you have updates available. But unlike previous versions of Mac OS X, there is no pulldown menu in System Preferences to change how often system updates are checked for, so if you want to adjust the update … Read More

How to Edit the Hosts File in Mac OS X with Terminal

Aug 7, 2012 - 33 Comments

The hosts file in Mac OS X is stored at /private/etc/hosts but can also be accessed at the more traditional location of /etc/hosts. If you’re looking to edit hosts, you’ll want to target the file located in /private/etc/ though. We’ll walk through how to manually edit the hosts file in OS X Lion and OS … Read More

Send an Alert to Notification Center from the Command Line in OS X

Aug 3, 2012 - 14 Comments

Using an excellent third party tool called terminal-notifier, you can post alerts and messages to Notification Center directly from the command line. This has a myriad of potentially valid uses, but one fantastic use-case is along the same veins of verbally announcing when a command has completed or sending a badge alert, but instead posting … Read More

Disable Sleep on a Mac from the Command Line with caffeinate

Aug 3, 2012 - 14 Comments

You’ve always been able to temporarily prevent a Mac from sleeping by using the pmset noidle command or a hot corner, but with OS X Mountain Lion, Apple has bundled a command line tool dedicated to sleep prevention much like the popular Caffeine app, and appropriately, named it caffeinate. At it’s most simple usage, caffeinate … Read More

Improve Tab Completion in Mac OS X Terminal

Aug 2, 2012 - 5 Comments

Tab completion is a wonderful feature of shells that make power users lives easier, letting you automatically complete commands, paths, file names, and a variety of other things entered into the command line. It works great as is but you can make it even better by enabling a few features; ignore caps lock and casing … Read More

Install Java in OS X Mountain Lion

Aug 1, 2012 - 28 Comments

If you need to use Java, installing the Java Runtime Environment (JRE) in OS X Mountain Lion is necessary even if you had Java previously installed in OS X Lion or Snow Leopard and just performed an upgrade to 10.8. That’s because Mountain Lion uninstalls Java during the upgrade process, this is to insure the … Read More

Sleep a Mac from the Command Line

Jul 22, 2012 - 18 Comments

Sleep can be invoked instantly on any Mac through the command line by running the pmset command or a very simple AppleScript. To try this yourself, launch Terminal and use one of the following commands, remember there is no warning, sleep is immediate: pmset sleepnow That is one of the most simple uses of pmset, … Read More