Open a URL in the Default Browser from the Command Line

Jul 18, 2011 - 1 Comment
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 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:

Get DNS Server IP Addresses from the Command Line in Mac OS X

Jun 3, 2011 - 6 Comments

You can quickly retrieve active DNS server IP addresses on any Mac by using the networksetup utility. This is done from the command line, so launch the Terminal app and type one of the following command strings, dependent on the version of OS X that is running on the Mac.

Enable and Disable AirPort Wireless from the Command Line in Mac OS X

May 31, 2011 - 11 Comments
AirPort Wireless icon

Sometimes the easiest fix when troubleshooting an AirPort wireless connection problem is to just turn AirPort on and off. Instead of using the menu item or System Preferences, we can enable and disable AirPort very quickly directly from the Mac OS X Terminal.

Launch & Run Multiple Instances of Any Application in Mac OS X

May 11, 2011 - 13 Comments
Run Multiple Instances of Any Application in Mac OS X

You can run multiple instances of any application in Mac OS X with a little command line magic. Using the ‘open’ command to launch GUI apps from the Terminal, we can run a new instance of any app, even if it is already running.

Generate Random Passwords from the Command Line

May 10, 2011 - 8 Comments

Some of the most secure passwords you can use are those that are randomly generated. From the command line, you can randomize potential passwords in a multitude of ways, and we’ll cover several primary methods and then show you how to combine commands to make passwords even more random. First, we’ll try my go-to method … Read More

Transfer Clipboard Text & Source Code From One Mac To Another Over SSH

May 5, 2011 - 6 Comments
Transfer Source Code and Text over SSH

Do you have some source code, text, or a command string that you want to securely transfer from one Mac to another? Combining the command line clipboard tools pbcopy and pbpaste with SSH we can do exactly that, and it doesn’t matter where the other Mac is located: be it LAN, WAN, or anywhere. Here … Read More

Show What Apps & Processes Are Using an Internet Connection via Command Line in OS X

Apr 29, 2011 - 3 Comments
Mac Wi-Fi Tool

Much like you can monitor Mac OS X filesystem usage through the command line, you can also discover what apps and individual processes are currently using your Macs internet connection. This is a really handy trick if you know your bandwidth is being used by something, or if you’re just trying to track down what … Read More

Disable Wake From Sleep When Opening the Lid of a MacBook Pro

Apr 26, 2011 - 6 Comments

If you don’t want your MacBook Pro to wake from sleep when you open the lid of the machine, all you need to do is launch the Terminal and type the following command:

Change the Admin Password with Mac OS X Single User Mode

Apr 25, 2011 - 61 Comments
Change Unknown Admin Password in Mac OS X

If you’re in IT, or just fixing Grandmas Mac, it’s not too uncommon to get a machine where you don’t have the admin users password. If you find yourself in this situation, you can easily change the Admin password, or any other users, simply by booting into Mac OS X‘s command line Single User Mode. … Read More

Monitor Mac OS X Filesystem Usage & Access with opensnoop

Apr 22, 2011 - 11 Comments
Monitor Mac OS X Filesystem Use and Access

The opensnoop utility is an amazing tool for tracking down specifics like what files specific applications are accessing, but you can also use opensnoop to monitor all filesystem access in Mac OS X. To do this, run the utility with no flags attached: sudo opensnoop You’ll be asked for your root password, and then you’ll … Read More

Subscribe to OSXDaily

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