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

Change the iPhones Default Root Password

Sep 10, 2011 - 2 Comments

If you’re going to run something like OpenSSH or MobileTerminal on your iPhone or iOS device so that you can SSH in to it, you’ll want to change the root password for obvious security reasons. Without doing this, anyone can use the default ‘alpine’ password and connect to the hardware, assuming they know an SSH … Read More

Automatically Customize Mac OS X with a Bash Script: 27 Defaults Write Commands, custom .aliases, .bash_profile, etc

Sep 9, 2011 - 8 Comments
Bash script to customize many aspects of Mac OS X

If you’re an advanced user and setting up a new Mac, you probably customize the OS with a ton of defaults write commands and .alias adjustments. These are things you can either enter manually, use an easy tool like LionTweaks, or check out this new great script from GitHub called .osx. Note: this is obviously … Read More

Use Any Font in the Mac OS X Terminal

Sep 2, 2011 - 6 Comments
Use any font in the Terminal of Mac OS X Lion

The Terminal in modern versions of Mac OS X enforces a new monospacing character width standard, which in laymen terms means you no longer have to use monospace fonts in the Terminal. That means you can now use any font you want, even Comic Sans like the screenshot shows down below (hooray?).

Disable “Reopen Windows When Logging Back In” in Mac OS X Completely

Aug 25, 2011 - 96 Comments
Disable Reopen Windows when Logging In

You may have noticed that when you log out or reboot Mac OS X, you get a dialog window with a checkbox next to “Reopen windows when logging back in” that restores all of your currently open applications and windows. If you don’t like it and you’re tired of unchecking the box to no longer … Read More

Take Screen Shots from the Terminal in Mac OS X

Aug 11, 2011 - 8 Comments
Take Screen Shots from the Terminal in Mac OS X

Aside from the keyboard shortcuts, Grab, and other screen shot apps, you can also take screenshots of your Mac OS X desktop directly from the Terminal with the ‘screencapture’ command. Here is a detailed overview of this utility and how to use it, which allows capturing screenshots from the command line with ease.

Mac Wi-Fi Dropping? Use a Simple Keepalive Bash Script to Maintain Wireless Connection

Aug 8, 2011 - 49 Comments
Get WiFi Router IP Address in Mac OS X

Many users who upgraded to Mac OS X Lion discovered that their Wi-Fi connections were dropping periodically for no apparent reason. We published a reasonably thorough walkthrough with tips on fixing OS X Lion’s wireless dropping issues and that’s a recommended starting point because most tips are easy and less complicated, but among those was … Read More

Change the Terminal Background Picture

Aug 5, 2011 - 15 Comments
Change the Terminal Background Image

If you’re bored with the standard black text on a white background of Terminal, you can really spice up the command line interface by adding a custom background picture. One of our commenters recently asked how to do this, so here we’ll walk through the process. This was written for OS X 10.7 but it’s … Read More

How to SSH to an iPhone or iPad

Aug 4, 2011 - 6 Comments
SSH iPhone

You may know already that iOS has the same underlying unix architecture as Mac OS X, and because of this you can SSH into an iPhone or iPad just like you would connect to any other Mac or unix based machine. As it turns out for us nerdier users, this ability is disabled without a … Read More

How to Get Lynx for Mac OS X

Jul 26, 2011 - 7 Comments
Terminal in macOS

Mac users can easily install and use the Lynx web browser in the Terminal. Lynx is a text based command line web browser, it’s relatively popular within unix communities but it also has a variety of general uses too; it’s great if you want to discretely browse the web and read articles at work or … Read More

MacPorts 2.0 for Mac OS X 10.7 Lion Released

Jul 25, 2011 - 9 Comments
MacPorts 2.0 for Mac OS X 10.7 Lion

MacPorts 2.0 has been released, the new version includes full OS X 10.7 compatibility. For those who are unfamiliar, MacPorts is a popular package management utility used to easily install thousands of open-source applications and utilities for the command line, X11, and even some Aqua apps. Because MacPorts handles the retrieval and building of dependencies … Read More

Open a URL in the Default Browser from the Command Line

Jul 18, 2011 - 2 Comments
Safari icon

Using the command line open tool, you can immediately launch any URL from the Terminal into the default web browser of Mac OS X. In other words, you’re launching the specified site into a GUI browser from the command line. The syntax to open any URL into the default web browser like this is remarkably … Read More

Change User Agent with curl to Get URL Source Code as Different OS & Browser

Jul 16, 2011 - 3 Comments

Using curl we can retrieve the HTML & CSS source code of any specified URL and even the http header info, but some sites serve completely different content or HTML to different OS and browser versions, this is done by detecting their user agent. Because of this, we can spoof the user agent of another … Read More

Get CPU Info via Command Line in Mac OS X

Jul 15, 2011 - 4 Comments
Terminal in macOS

Have you ever wondered specifically what processor was being used on a Mac, including processor type and CPU speed? It’s actually quite easy to retrieve CPU information from the command line in Mac OS X, though the commands to use to get the processor information may be unfamiliar to many. We’ll show two ways to … Read More

Get Exact Boot, Sleep, and Wake Times from the Command Line

Jul 14, 2011 - 7 Comments

Need to know exactly when your Mac was last booted, put to sleep, or woke from sleep? You can get precise information about boot and sleep times directly from the command line, which can be invaluable for anything from troubleshooting various Mac problems to scheduling scripts, or even for your own forensic purposes to determine … Read More

Display a List of Open Network Connections on the Mac OS X Desktop

Jul 11, 2011 - 10 Comments
Display open network connections on Mac OS X desktop

Using GeekTool and lsof, you can display an automatically updated list of open network connections directly on a Mac OS X desktop. This is tip is a “safe” alternative to the previously mentioned open_ports utility. The problem with installing and using open_ports is that it is a third party script running as root, and for … Read More

Watch All Open Network Connections in Mac OS X with Open_Ports

Jul 9, 2011 - 20 Comments
Show open network connections on the Mac OS X Desktop

You can watch all open network connections for both incoming and outgoing transfers using a free command line utility called open_ports.sh. Open_Ports is much more useful than using lsof to list open internet connectionsbecause it provides extensive network information in a very easy to read format, including what program or process is opening the connection, … Read More

Convert Font Family and Text Size of a Document from the Command Line

Jul 8, 2011 - Leave a Comment
Convert font and text size of a document

The powerful textutil command for Mac offers an amazing capability to convert a text documents font family and text size, transforming the document with ease and precision right from the command line of Mac OS.

Get HTTP Header Info from Web Sites Using curl

Jul 7, 2011 - 7 Comments
Terminal in macOS

The easiest way to get HTTP header information from any website is by using the command line tool curl. The syntax to retrieve a website header goes like this:

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