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

Opening Finder Windows from the Terminal

Dec 15, 2009 - 8 Comments

Finder, the Mac OS X file system browser, is ultimately just a nice looking GUI application, and it can be interacted with fluidly from the command line. This means you can jump to directories and open literally any Mac Finder window directly from the terminal by using a simple command string based upon the ‘open’ … Read More

Accessing the OS X Clipboard from the Command Line

Dec 9, 2009 - 6 Comments

With the pbcopy and pbpaste commands, you can use the command line to manipulate clipboard contents but also access your Mac OS X clipboard directly through the Terminal. Yes, that means you can access what you copied in a GUI app and use it in the command line seamlessly, and vice versa. We’ve shown a … Read More

What is My IP Address? How Do I Get My External IP Address in Mac OS X?

Dec 8, 2009 - 13 Comments

One of the quickest ways to get your external IP address in Mac OS X or unix is by launching the Terminal and typing one of the following commands with curl. To be perfectly clear here, we’re looking for the external public IP address of the hardware in use, this is what broadcasts to the … Read More

List All Mounted Drives and their Partitions from the Terminal

Dec 1, 2009 - 7 Comments

To list all mounted drives and their accompanying partitions from the Terminal on Mac OS X, you can use the diskutil command with the list flag. This approach will display all disks, drives, volumes, and containers on any drive connected to the Mac, including boot volumes, hidden volumes (like the Recovery partition), empty volumes, unformatted … Read More

Open Current Folder in Finder from Terminal of Mac OS X

Nov 30, 2009 - 14 Comments

Want to open a Finder window from the current directory location in Terminal? Mac OS makes this easy! From the Mac Terminal, you can immediately open whatever folder or directory you are working within into the Finder of MacOS and Mac OS X by simply typing the a short command string and executing it. To … Read More

Schedule a Mac to Startup via Command Line with pmset

Nov 28, 2009 - 5 Comments
Terminal in macOS

Most Mac users who want to schedule a Mac to startup at a specific time will use the Energy Saver schedule tool in System Preferences, but for the more technically savvy, another option is to schedule the boot time of a Mac through the command line. We’ll show you how to use the pmset command … Read More

Copy a File or Folder Path to the Terminal by Dragging and Dropping

Nov 23, 2009 - 2 Comments
Terminal in Mac OS X

Did you know you can quickly copy a files path to the Terminal just by dragging and dropping the folder or file into the Terminal window? Try it out, open any terminal window then take something from the Finder and drop it into that Terminal, it’ll instantly print out the full path to the file, … Read More

Quickly execute new Terminal command from the Dock

Nov 10, 2009 - 4 Comments
Terminal icon in OS X

If you have the Terminal application stored in your Dock on Mac OS X, you can quickly execute any new command by right-clicking (or control clicking) on the Dock icon and navigating up to “New Command” in the popup menu. This will prompt you for a command to run, which then launches into a terminal … Read More

Watch Movies in ASCII Art with VLC

Nov 7, 2009 - 4 Comments

Ever wanted to watch a movie in ASCII art? What’s that? You haven’t even thought about it before? In what might be the single most useless feature to ever grace a video player, VLC allows you to output any video playback as… ASCII art. Yes, the kind of ASCII art that was quite fancy on … Read More

How to Stop Dock Icons from Animating in Mac OS X via defaults Command

Nov 3, 2009 - 2 Comments

The Mac OS X Dock becomes animated when an app is launching, with a continuous bouncing animation, and also when an app wants to get your attention, with a less consistent and more urgent animated bounce. Both of these can be effect alert methods, but they can also annoy some users. Regardless, you can make … Read More

Quick Guide to Bash Shell Scripting

Oct 30, 2009 - 5 Comments

Shell scripting is wildly useful and a powerful way to manipulate a lot of files and to automate behind-the-scenes tasks in Mac OS X. This guide is intended for Linux users but the Bash shell is also used in Mac OS X, and as far as I can tell everything in this bash shell scripting … Read More

Set a Local Domain to Ease Local Development

Oct 28, 2009 - 8 Comments
Terminal in macOS

If you’re a web developer you probably do a fair amount of development on your local machine using either the built-in Mac OS X Apache server or, in my case, something like MAMP. Because a local web server like this is really handy for testing this, you can make your local development life a bit … Read More

Play MP3’s, M4A, AAC, and Other Music Files from the Command Line

Oct 27, 2009 - 3 Comments
Terminal in macOS

Ever wanted to play music while you’re working in the command line? Maybe you want to play a podcast from the command line on Mac? With the command line tool ‘afplay’ you can do just that, you can play practically any audio file format, whether it’s M4A, AAC, MP3, WAV, AIFF, or whatever else is … Read More

Quickly find the largest files in a directory

Oct 26, 2009 - 4 Comments

From the Terminal, if you want to quickly find out what the largest files are in a directory, try this variation of the ls command: ls -lShr the l flag will display the items in a list, the S flag sorts by size, and h makes it readable in MB/GB (human readable), with r reversing … Read More

Remove the Spotlight menu bar icon

Oct 17, 2009 - Leave a Comment

We get a lot of comments and inquiries about disabling Spotlight, something that I don’t understand since I think it’s a fantastic application launcher. Opinion aside, if you have disabled Spotlight and want to remove the Spotlight menubar icon from your desktop, type the following command in the Mac Terminal: Remove Spotlight menubar icon sudo … Read More

Migrating MacPorts apps through major OS upgrades

Oct 16, 2009 - Leave a Comment

I have become dependent on many command line applications I have installed through the open source MacPorts effort, and if you have too you’ll really appreciate this guide. When upgrading Mac OS X to a new major OS (say, upgrading Tiger to Snow Leopard) you may notice that some MacPorts installations get screwy and no … Read More

Check MD5 Hash on your Mac

Oct 13, 2009 - 19 Comments
Mac Terminal icon

You can easily check the MD5 Hash of any file on your Mac, all you need to do is launch the Terminal and type the ‘md5’ command and point it at the file you wish to check the md5 has for. How to Check MD5 Hash of a File on Mac First launch the Terminal … Read More

Monitoring CPU Usage on Mac from Terminal with a better top command

Oct 6, 2009 - 11 Comments
a better top command

Following the CPU usage on my Mac is a mild obsession, and I usually use the Mac terminal command ‘top’ to do this but I noticed that top itself takes up a fair amount of CPU usage (5% or more). I made this complaint to a friend of mine and they told me to try … 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