Posts tagged with “”

Disable the System Bell in iTerm

Spend enough time in a terminal session and eventually the system “bell” will drive you nuts. I honestly don’t remember it being this much of an issue on my old Macbook Pro, but it’s been maddening since I got my new one a few weeks ago. Because of its bookmarks feature, iTerm is my emulator of choice and there’s nothing in its preferences (I’m using Build that even acknowledges a system bell exists, much less allows me to disable it. I did a clean install when I got my new machine, so maybe this is a recent change. I haven’t looked at the release history to determine why it’s not there, I can only be sure that it’s not.

In a fit of desperation this morning, I decided to scour the plist file to see if there was anything I could do at a slightly lower level to quiet my terminal sessions. Fortunately, I found an answer:

  1. Navigate to ~/Library/Preferences.
  2. Open net.sourceforge.iTerm.plist in your favorite plist file editor. I use Property List because I have XCode installed and the app is available to me. There are other plist editors out there or you can just open the file in a text editor – it’s just an XML file with a fancy extension.
  3. Navigate the XML nodes (different editors may offer different means of drilling down) to Root > Terminals > Default > Silence Bell
  4. Click the checkbox to enable that property.
  5. Save the change.
  6. Restart iTerm.

Enjoy the silence.

Renew a Mac's DHCP Lease Via Terminal

Being a long-time (and still part-time) Windows user, I’ve spent many a not-so-happy second typing the following:

> ipconfig /release
> ipconfig /renew

Today, though, I made a few changes to secure my network and needed to renew the DHCP lease of my Mac. Usually, I’m sitting in front of the laptop so I can just use the System Preferences GUI, but not today. Today I had to remote in so I only had the command line available and I realized that I had no idea how to map the Windows commands above to the Mac terminal. Mostly for the sake of posterity:

$ sudo ifconfig set en0 BOOTP
$ sudo ifconfig set en0 DHCP

In typical Unix fashion, there’s no output to indicate that succeeded or did anything at all, for that matter, but it seems to do the trick.