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

Get Extended CPU Information from the Command Line

Apr 28, 2012 - 5 Comments
Get extended CPU information from the command line

Using sysctl we can get extended information on a Macs processor, covering everything from CPU brand and identifier, clock speed, number of cores, thread count, thermal sensor data, cache size, and some significantly more technical information. This is a handy way to get detailed processor specs and info without turning to the system profiler in … Read More

Free Up Inactive Memory in Mac OS X with Purge Command

Apr 24, 2012 - 69 Comments
Free Up Memory in Mac OS X

Mac OS X has fairly good memory management but it’s not perfect, and sometimes RAM can be held unnecessarily in the “inactive” state despite the contents no longer being needed. If you’ve been participating in memory heavy activities or you just need to free up some available RAM you can actually force Mac OS X … Read More

Change Length of Bash Command History or Disable Bash History Completely

Apr 12, 2012 - 6 Comments
Bash History

A users .bash_history file keeps a running tab of command line history, logging every command that has been entered into the bash prompt. These command history files make it very easy to find and recall past commands that may have been forgotten, and they’re also extremely useful for system administration. We will cover how to … Read More

How to Create a Tar GZip File from the Command Line

Apr 5, 2012 - 16 Comments
How to Create a Tar GZip Archive Bundle

You’re probably familiar with making your own zip files if you’ve ever needed to transfer a group of files or if you’re managing your own backups outside of Time Machine. Using the GUI zip tools are easy and user friendly, but if you want some more advanced options with better compression you can turn to … Read More

Lock the Mac Desktop from the Command Line

Mar 30, 2012 - 10 Comments
Lock the Mac OS X Screen from the Command Line

With the help of a buried menu item, we can lock the Mac OS X screen right from the Terminal. This does not log a user out, it just brings up the standard Mac OS X lock screen and login window, requiring a valid user and password before the Mac can be used again. This … Read More

Quickly Get a Router IP Address from the Command Line

Mar 23, 2012 - 8 Comments
Router IP Address

If you need to quickly retrieve the IP address of the router you are connected to or through, you can find this information immediately in the Terminal of Mac OS X.

Change the Shell in Mac OS X Terminal

Mar 21, 2012 - 12 Comments
Change Shell in Terminal

Tired of bash? Prefer zsh, ksh, tcsh, fish, or sh? You can quickly change the default shell in Terminal app, in addition to changing a users default login shell for when logging in remotely with SSH or otherwise. Here’s how to do both.

Create ISO Images from the Command Line

Mar 16, 2012 - 3 Comments
ISO

You can create ISO images from any source disk or data by using the command line in Mac OS X. This isn’t too different than burning them through Terminal, and you can use either the hdiutil tool or dd command. While the command line is generally reserved for advanced users, using it to create ISO’s … Read More

How to Burn an ISO Image from Command Line of Mac OS X

Mar 13, 2012 - 13 Comments
disk identifier found from diskutil list

The most straight forward way to burn an ISO from a Mac is using Disk Utility, but you can also burn ISO’s and disk images directly from the command line with the help of a tool called ‘dd’. This works for Mac OS X and Linux, but we’re going to be focusing on the Mac … Read More

Change (Spoof) a MAC Address in OS X Mountain Lion & Mavericks

Mar 1, 2012 - 50 Comments
Change a MAC Address in Mac OS X

A MAC address is a unique identification number assigned to network interfaces, these can be attached to physical hardware like NIC and Wi-Fi cards or assigned to virtual machines. On some occasions, you’ll need to change a MAC address to another ID. We’ve received a few questions about this recently because the process of changing … Read More

Find & Scan Wireless Networks from the Command Line in Mac OS X

Feb 28, 2012 - 12 Comments
Terminal in macOS

A long hidden airport command line utility buried deep in Mac OS X can be used to scan for and find available wireless networks. This powerful tool is very helpful for network admins and systems administrators, but it’s handy for the average user to help discover nearby wi-fi routers as well.

10 Keyboard Shortcuts for Text Navigation & Manipulation in the Command Line

Feb 27, 2012 - 4 Comments
Navigate text in the command line

We recently covered 12 keyboard shortcuts to help navigate around and manipulate text in Mac OS X, and now we’ll show you a handful of similar tricks for use at the command line. These shortcuts can be used just about anywhere in the Terminal, including the bash prompt.

IR_Black Theme Add Colors Easily to the Terminal in Mac OS X

Feb 24, 2012 - 7 Comments
IR_Black theme for OS X Terminal

We recently covered the classic method of adding colors to the command line by editing .bash_profile, but it turns out that Terminal in OS X Lion and OS X Mountain Lion both support custom ANSI colors, giving the ability to easily change the ansi color scheme through external theme files. One such color scheme is … Read More

Add Color to the Terminal in Mac OS X

Feb 21, 2012 - 22 Comments
Dark Terminal Colors

Adding colorized ls output to the Terminal in Mac OS X is a good way to make navigating around the command line a bit easier on the eyes. This makes different items show up in different colors, including directories, files, executables, and symbolic links.

Verify SHA1 Hash with openssl

Feb 9, 2012 - 2 Comments

An alternative to checking a SHA1 hash with shasum is to use openssl. Yes, the same openssl utility used to encrypt files can be used to verify the validity of files. The syntax is quite similar to the shasum command, but you do need to specify ‘sha1’ as the specific algorithm like so:

Check SHA1 Checksum in Mac OS X

Feb 5, 2012 - 10 Comments
Mac Terminal icon

SHA hashing is frequently used with distribution control systems to determine revisions and to check data integrity by detecting file corruption or tampering. For common usage, a SHA checksum provides a string that can be used to verify a file been transferred as intended. If SHA checksums match, the files integrity has been maintained. This … Read More

Reindex Spotlight from the Command Line in Mac OS X

Feb 2, 2012 - 9 Comments
Spotlight

Spotlight is generally very good at keeping a valid index of a drives contents up to date, but if you’ve recently restored a drive or had to delete the Spotlight index for one reason or another, you may need to reindex the drive manually. This is easy from the Spotlight control panel, and can also … Read More

See All Previously Used Defaults Commands in Mac OS X

Jan 31, 2012 - 8 Comments
defaults history

It’s easy to lose track of all the defaults commands used to perform tweaks to Mac OS X, but with the help of the history command it’s easy to list every defaults write and accompanying defaults delete commands ever used on a Mac. Launch the Terminal to get started. See All Defaults Commands Executed To … 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