Command Line

The command line interface is an alternate method of interacting with macOS and Mac OS X, relying on text based command entry to execute commands and perform tasks. It is accessed on the Mac by using the Terminal application. Generally, the command line is considered advanced, and thus it’s usage tends to be more complex than many standard procedures on a Mac.

Search Command Line

How to Change the Software Update Frequency in MacOS X

Aug 30, 2012 - 7 Comments
Change Software Update check frequency in OS X Mountain Lion

Do you want to change how often Mac OS checks for available software updates? It’s possible to adjust the Mac software update frequency with a little effort. Mac OS X now automatically checks for software updates, and a notification pops up if you have updates available. But unlike older versions of Mac OS X, there … Read More

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

Aug 7, 2012 - 51 Comments
Terminal in macOS

Need to edit or modify the hosts file on a Mac? This guide will show you exactly how to edit the hosts file in Mac OS. You’ll find hosts in Mac OS X is stored at /private/etc/hosts but it can also be accessed at the more traditional location of /etc/hosts. That said, if you’re looking … Read More

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

Aug 3, 2012 - 21 Comments
Send Alert to Notification Center in OS X

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 - 20 Comments
Caffeinate causes a Mac to avoid sleeping via command line

You’ve always been able to temporarily prevent a Mac from sleeping by using the pmset noidle command or a hot corner, but with modern versions of Mac OS X, 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 … Read More

Improve Tab Completion in Mac OS X Terminal

Aug 2, 2012 - 5 Comments
Improve Tab Completion in Terminal

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 - 29 Comments
Install Java in OS X Mountain Lion

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 - 21 Comments
Mac Terminal icon

Sleep can be invoked instantly on any Mac through the command line by running the pmset command or a very simple AppleScript run in Mac OS X. This can be useful for many reasons, whether scripting, system administration, remote management with SSH, or perhaps you just live in the command line. We’ll show you two … Read More

Rename Terminal Tabs in Mac OS X

Jul 20, 2012 - 10 Comments
Rename Terminal Tabs

Having a bunch of Terminal tabs named “bash” “bash” and “bash” isn’t too useful or descriptive. Instead, you can rename each tab individually to something more specific by using the Terminal inspector. Before doing so, keep in mind that tabs default to rename themselves automatically based on the currently running process, thus if the terminal … Read More

Quickly Hide a File in Mac OS X Using chflags

Jul 19, 2012 - 7 Comments
Hide a file in Mac OS X

Want to quickly hide a file from prying eyes? Just like you can hide folders, you can hide individual files too. Here is how to do this using the command line tool chflags. Launch Terminal from /Applications/Utilities/ and use the following command syntax: chflags nohidden /path/to/hide/file.txt If you know the path to the file just … Read More

Force Empty Trash in Mac OS X When File is Locked or In Use

Jul 19, 2012 - 56 Comments
Force Empty the Trash if a file won't delete

Mac OS X can sometimes throw permissions errors when trying to delete files or empty the Trash. The most common variations of the errors are usually “Operation cannot be completed because the item “File” is in use” or “because the file is locked”, sometimes you can get around this by just quitting open applications or … Read More

Send a Notification Badge to the Terminal Dock Icon When a Task is Finished

Jul 17, 2012 - 12 Comments
A notification badge alert is sent to the Terminal icon in the OS X Dock

Not long ago we showed you how to announce when a command line task was finished by using the ‘say’ command, but because it speaks aloud it may be inappropriate to use in a quiet environment. A much more subtle notification takes advantage of Terminal apps new usage of the BEL alert, which in OS … Read More

Move SSH Keys From One Computer to Another

Jul 13, 2012 - 4 Comments
Migrate SSH Keys through Finder

For those that rely on passwordless logins via ssh, rather than generating a new SSH key for a new client machine, you can easily move SSH keys from one computer to another. This is a quick and easy solution for a temporary machine or username or for use on an auxiliary workstation. You could also … Read More

Show Download History List of All Files Ever Downloaded Within Mac OS X

Jul 12, 2012 - 37 Comments
Terminal in macOS

Have you ever wanted to show a list of the entire download history of a Mac? Maybe you know you downloaded a file but you can’t quite pinpoint where you got it from and the “Get Info” trick didn’t work. Or maybe you are trying to track down a file that has been placed on … Read More

How to Install Paramiko and PyCrypto in Mac OS X the Easy Way

Jul 10, 2012 - 7 Comments
Installing paramiko and pycrypto for Mac OS X

Paramiko is an SSH module for python that allows for secure connections to be made, and pycrypto is a cryptography toolkit for python. Whether you need one or the other, or both, the easiest way to get them both installed through Mac OS X is through paramiko. No need to use HomeBrew, MacPorts, or any … Read More

Manage iOS Devices & Provisioning from the Command Line with Cupertino

Jul 7, 2012 - Leave a Comment
Manage iOS Devices and Provisioning from the Command Line with Cupertino

iOS Developers typically have to login to Apple’s Developer Center website to manage provisioning and devices. That’s not terribly inconvenient, but it certainly could be easier, and that’s where Cupertino comes in. Cupertino is a third party command line interface to the Apple Dev Center and iOS Provisioning Portal, letting you add and list devices, … Read More

Install GCC Without XCode in Mac OS X

Jul 6, 2012 - 4 Comments
Command Line Tools for Mac OS X include GCC, Make, LLVM, and more

If you compile your own software you probably know that GCC comes bundled in the rather large Xcode package, but what if you just want to have gcc and LLVM without installing the entire Xcode package? Apple now offers an option to do just that, and it’s called Command Line Tools, available as a separate … Read More

Delete All .DS_Store Files from Mac OS X

Jul 5, 2012 - 36 Comments
DS_Store Files in Mac OS X

DS_Store files are hidden system files that reside within almost every folder of Mac OS X, they contain folder-specific information and settings, like what view to use, icon size, and other metadata pertaining to their directory. Though ds_store files are invisible to the average user, if you’re sharing with a Windows PC or have hidden … Read More

Change Finder Windows View Style from the Command Line in Mac OS X

Jul 4, 2012 - 7 Comments
Finder window list view options

Unless it has been disabled, any Finder window in Mac OS X has the View option buttons in the windows toolbar. From left to right you can select icon view, list, columns, and coverflow. You may have noticed the window view style doesn’t always persist across Finder windows though, even if you selected “Always Open … Read More

Subscribe to OSXDaily

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

Tips & Tricks

News

iPhone / iPad

Mac

Troubleshooting

Shop on Amazon to help support this site