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 Bypass a FileVault Password On a Per Boot Basis with Mac OS X

Mar 6, 2015 - 12 Comments
Lock a Mac Screen

Using FileVault full disk encryption is one of the better ways to protect your Mac and personal documents from prying eyes and password resets, but if you’re troubleshooting a Mac with FileVault, either your own or someone else’s, it’s kind of annoying to have another layer of passwords necessary to enter before you’ll be able … Read More

How to Enable & Disable root User from Command Line in Mac OS X

Feb 19, 2015 - 7 Comments
Terminal in macOS

Though most advanced Mac users will find it easiest to enable root with Directory Utility from the GUI of Mac OS X, another option is to turn to the command line. No, we’re not talking about using sudo or su, we’re talking about enabling the actual root user account, which can be appropriate for some … Read More

Flatten a Nested Directory & File Hierarchy from Command Line of Mac OS X

Feb 11, 2015 - 19 Comments
Nested directory structure to flatten as shown in the Finder of Mac OS X

Have you ever needed to flatten a directory structure, moving all file contents from a directories child folders into a single folder? While you can do this manually by moving around files and folders from the file system of Mac OS X or Linux, a faster option is to turn to the command line. Maybe … Read More

Understanding Why Terminal Doesn’t Let You Type a Password

Feb 4, 2015 - 33 Comments
Typing a password into Terminal won't show up, this is intentional

Sometimes you need to enter a password into the terminal, usually for sudo or su commands, which lets users execute a command with super user privileges. This is fairly typical for allowing access to read or modify something that would otherwise not be possible with a standard user account. You’ll commonly see sudo prefixing another … Read More

Set or Disable Sleep Due to Mac System Inactivity from Command Line in Mac OS X

Feb 3, 2015 - 12 Comments
Sleep Mac

Mac users can adjust the idle time to sleep their computers easily through the Energy Saver preference panel, but many advanced Mac OS X users may wish to turn to the command line to perform such a task. This allows for scripting, remote checking and changing idle sleep behavior through SSH, and you can also … Read More

Increase Font Size in Terminal for Mac OS X Quickly with Keystrokes

Jan 11, 2015 - 6 Comments

The default text size used by Terminal app in OS X can be quite small if you’re using a large resolution display. While you can change the font to be better suit your preferences, and increasing the line spacing helps reading too, another simple solution to boost readability is to simply increase the text size … Read More

Clear Font Caches & Font Databases in Mac OS X to Resolve Unusual Font Problems

Jan 8, 2015 - 20 Comments
Fonts displaying erroneously in Mac OS X

In some unusual and admittedly rare situations, fonts in OS X and various Mac apps may display erroneously, or outright fail to display. Typically this happens after a font has been modified or a font has been installed outside of the standard ~/Library/Fonts directory, but it can happen out of the blue in some situations … Read More

Make the Window Resizing Animation Speed Instant in Mac OS X

Jan 6, 2015 - 26 Comments
Speed up Window Resize Animations in OS X

When you hit the green maximize button to resize windows on a Mac or send things into full screen mode, a fancy visual animation shows the redrawing of the window size as the active window expands outwards. While this looks great and many users will be happy with the default resizing animation time in OS … Read More

Increase Line Spacing in OS X Terminal to Improve Readability

Jan 5, 2015 - 4 Comments

If you’re a Mac user who finds the text output shown within Terminal app to be a bit too confined and tightly spaced, you’ll be pleased to discover that you can adjust the line spacing to accommodate your preferences. You can boost line spacing within Terminal dramatically or just a little bit (or if you … Read More

Check & Modify AutoCorrect Settings from the Command Line in OS X

Dec 18, 2014 - 5 Comments
defaults write commands in Mac OS X

Spelling autocorrect features tend to be divisive, with Mac users usually either loving it or hating it. Most Mac users know they can easily turn off autocorrect through an OS X system preference change, but the System Preferences are only accessible from the graphical interface of a Mac. If you’re wanting to automate the enabling … Read More

Search the Manual Page Index for String Matches in Terminal for Mac OS X

Dec 2, 2014 - 2 Comments
apropos command matches in Mac OS X Terminal

Many command line users are familiar with the ‘man’ command that will open a manual page for a specific command, but what if rather than a specific commands man page, you’re looking for a string match within all man pages? That’s what this tricks is for, so whether you’re trying to learn more about a … Read More

How to Start & Stop MySQL Manually in OS X El Capitan & Yosemite

Nov 26, 2014 - 9 Comments
MySQL Start and Stop server

Many developers require MySQL on their Macs, but if you’ve tried to install MySQL in OS X El Capitan and Yosemite, you likely noticed that you’ll get an “installation failed” error during the process. That error sounds worse than it is, because you can avoid it entirely by choosing not to install the startup item … Read More

How to Flush DNS Cache in OS X Yosemite with discoveryutil

Nov 20, 2014 - 23 Comments
Clear DNS Cache in Mac OS X

Some Mac users may encounter situations where they need to flush DNS cache in OS X for a name server to resolve properly, or for some DNS address change to become noticed by their individual computer. This is particularly relevant for system administrators, network admins, and web developers, but there are certainly situations where other … Read More

OS X Bash Update 1.0 Released to Address Shellshock Security Flaw

Sep 29, 2014 - 20 Comments
Terminal in macOS

Apple has released an important security update for Mac users, labeled as OS X Bash Update 1.0. The update addresses a recently discovered critical security flaw known as “Shellshock” that impacts the bash shell, the default shell used by the Terminal app of OS X, and is recommended for all users to install even if … Read More

Gracefully Close an Application from the Command Line in Mac OS X

Sep 5, 2014 - 11 Comments

Quitting apps gracefully is typically done through the appropriate application menu by choosing “Quit”, but the Mac GUI is obviously inaccessible from the command line of Mac OS X. So when most command line users are confronted with the need to exit an application, they wind up using the ‘kill’ command to terminate the process … Read More

How to Enable Safe Mode from Command Line on Mac

Sep 4, 2014 - 4 Comments
Terminal in macOS

Troubleshooting complex issues on a Mac can be challenging as is, and if you’re ever confronted with some complex situations you may find the command line to lend a major hand. In this case, advanced users can boot a Mac into safe mode through the usage of the nvram utility, a tool which allows users … Read More

List All Network Hardware from Command Line in Mac OS

Sep 3, 2014 - 8 Comments
Network Utility in Mac OS

The networksetup utility offers a command line interface to configuring the variety of Mac networking features available in Mac OS X. We’ve discussed networksetup and accompanying features many times here for more advanced purposes, but one of the simpler uses of networksetup is that it can list out every piece of networking hardware attached to … Read More

How to Get Current Screen Resolution from Command Line in Mac OS X

Aug 31, 2014 - 6 Comments
Display resolutions in Mac

Typically Mac users will retrieve the screen resolution of connected displays through the Displays system preference panel in OS X. There’s certainly nothing wrong with that approach, it’s easy and quick, but because it uses the graphical interface of OS X it’s not necessary helpful for scripting purposes or remote management through Remote Login and … 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