DealsOnTheWeb Daily Deal: 8GB iPod Touch: $229 Delivered
TMO Quick Tip - Repairing System Problems from the Command Line
by , 7:30 AM EDT, July 31st, 2006
If you suffer a system crash on your Mac, the battery accidentally drops out of your 'Book, or the power cord is unexpectedly yanked from your PowerMac or iBook, your computer may not start up and smoothly return you to your Desktop. Typically, I recommend Alsoft's DiskWarrior to repair any system damage and get you back on your feet. If you don't have a copy of DiskWarrior handy, however, you may need to resort to some Unix command line magic to get up and running.
Here's the disclaimer: Playing around with the Unix command line can be very dangerous if you don't know what you are doing. If you aren't comfortable mucking around in a place where you can delete everything on your hard drive with a simple command, find a friend that knows what they are doing, visit your local Mac User Group, or find a Mac consultant to help you out.
With that in mind, we're going to boot your Mac in single user mode and run the file system check command. Follow along, brave souls:
- Start up your Mac.
- As soon as you hear the startup chime, press and hold Command-S.
- Wait until the gray startup screen goes away and you see white text scrolling down a black screen. Now you can release the keys.
- Now you are in single user mode. With a little Unix know-how, you can do anything you want... Including deleting all of your files. Keep that in mind.
- Type fsck -f and then press return. Spelling and capitalization count, so make sure you type everything correctly.
- Your Mac should list off several things it is checking. If you get a message that says your file system appears to be okay, great! It's time to restart your Mac. If you get a message that says your file system was modified, you need to use the fsck -f command again.
- Let's assume your Mac says everything is okay. Now it's time to restart your computer. Type shutdown -h now and press Return.
- Once your Mac shuts down, go ahead and press the power button to turn it back on.
Many people use the reboot command instead of the shutdown command. That's perfectly fine. It saves you a few keystrokes when restarting your Mac, and you won't have to press the power button, either. I use the shutdown command because that's what I was taught to use when I first started fiddling around with Unix. The theory is that shutting down flushes everything from memory - eliminating any possible memory corruption. Old habits die hard.
If you prefer to use the reboot command, simply type reboot and then press Return.
One more thing: If you use a Bluetooth keyboard, be sure to keep a USB keyboard handy. You can't use a wireless keyboard to invoke special startup commands like Command-S.
if you have ideas for Mac related tips that you think other TMO readers might find helpful.
Observer Comments
Mon Jul 31, 2006 7:42 am Subject: Additional Shutdown Option
You know, I hate the command line. I think what brought me to the Mac in the 80s was the total lack of command line. I'd been using computers with them before at school and home but it wasn't till I used a Mac that I finally 'got it' a computer that was powerful, that I understood and didn't have a friggin' command line : )
I'm sure the command line is powerful, and I've given it a go now and then, but, it's just really not for me. I'd only use it, if I really have no other choice.
(I'm being more generalistic and this is more about using it to fix your Mac)
Mon Jul 31, 2006 9:33 am Subject: bluetooth comment not true
Mon Jul 31, 2006 9:59 am Subject: What is the difference
Mon Jul 31, 2006 10:45 am Subject: No Reboot is Necessary
A reboot is not necessary after performing the fsck -fy procedure. All you have to do (once you get word that your file system is okay) is to type "logout," press RETURN (or enter), and at this point Darwin will load all the GUI libraries and you will soon be presented with the standard Aqua user login window.
Jeff Mincey
Mon Jul 31, 2006 12:21 pm Subject: The most important thing to remember: backup
If you find yourself in a situation where starting in single user mode is necessary, or using any disk utility is necessary, be prepared for the possibility the problem may be worse than the disk utility can handle. Too often I've seen people depend on disk utilities to get themselves out of a jam, when they haven't backed up. Eventually all media fails to work in one way or another. It is not a question of if data will be lost but when. And hard drive failing symptoms can be identical to those you'd use Disk Warrior to solve. So only operate on an already backed up drive. See my FAQ for more info:
http://www.macmaps.com/backup.html
Mon Jul 31, 2006 3:45 pm Subject: This Tip Is Invalid for Panther and Tiger
By default Panther and Tiger implement file system journaling. That interferes with the normal fsck process. Just start up in Safe Mode instead:
http://docs.info.apple.com/article.html?artnum=106214
http://docs.info.apple.com/article.html?artnum=107250
BTW, as TheCiscoKid mentioned, Apple's Bluetooth keyboard will initiate and work in single-user mode just fine.
Mon Jul 31, 2006 10:59 pm Subject: Re: What is the difference
Recent Headlines - Updated Monday, May 12th, 2008
- Mon., 9:40 AM
- iPodObserver - Rumor: New iPhones Now, Tablets at WWDC
- 9:15 AM
- iPodObserver - SingTel Announces Singapore iPhone Deal
- 8:40 AM
- Pixelmator 1.2 Draftsman Adds Rulers, Adjustments
- 8:15 AM
- iPodObserver - iPhone Unavailable at US, UK Apple Store
- 8:00 AM
- iPO Ted Landau's User Friendly View - In search of headphones for my iPhone
- 7:30 AM
- iPO Quick Tip - iPhone: Saving SMS Messages to Your Mac
- Fri., 6:00 PM
- iPO Free on iTunes - Aussie UFOs, StrangeThings, Hometown Tales and More
- 5:30 PM
- StrangeCharm - Fewer Particles, More Debris ( Week of May 5)
- 4:05 PM
- MW: The New Rules for Buying a Mac
- 3:15 PM
- OpenOffice 3.0 beta Released for Mac OS X
- 1:30 PM
- Pogue: Time Capsule is So Simple, Just Ignore It
- 1:05 PM
- C|Net: Why Apple Should Build a Game Console
- 10:45 AM
- Hot Forum Topic - The iPhone's March Across the World
- 10:20 AM
- Mailplane 2 Beta Includes OmniFocus Support
- 9:45 AM
- iPodObserver - Apple Canada Offers $45 Credit in iPod Suit
- 9:05 AM
- Apple Settles Power Adapter Suit
- 8:05 AM
- Microsoft Dissolves Yahoo Proxy Board
- 7:30 AM
- TMO Quick Tip - Tracking Application Updates in Dashboard
The Mac Observer Reader Specials
- Download Typestyler, still the Ultimate Styling Tool for Internet, Print and Video Graphics. Works great in Classic with a Native OS X Version on the way. Free Tryout: www.typestyler.com
- Other World Computing: Performance SATA Drives up to 1.0TB from $54.99 Replace, Upgrade, Add SATA to Mac Pro, PowerMac G5, iMac G5 & even PowerMac G4(with PCI SATA Card) Specials: 400GB from $99; 500GB 7200RPM from $99; 750GB & 1.0TB In Stock now!
Memory For New Intel Core2 DUO MacBooks, MacBook Pro, MacMini & iMacs" 4GB Kit $80, 3GB Kit $60, 2GB Kit $40, 1GB $20. Click to Maximize your Macs...
Mac observers can now play Party Poker for Mac as well as Mac casino games by going to MacPokerOnline.com.For the latest Apple products use Ciao a comparison website to find laptops like MacBook Air. Then find the best prices on MP3 players and use our comparison tool to evaluate cell phones.
Laptop Hardware Provided by TechRestore - Overnight Mac & iPod Repairs.

