Follow System & Kernel Logs from the Command Line in Mac OS X

Apr 20, 2011 - 1 Comment

Mac OS X Console Logs from Command Line

If you’re troubleshooting some of the more difficult problems that you can have on a Mac, a good place to look are the System & Kernel Logs contained within Console app. Unfortunately there are times when you can’t access Console either because you are remotely troubleshooting, in Single User Mode, or even because the log files have grown so large that it actually starts crashing when it’s trying to load (this has happened to me more than once).

If you’re in this situation, or any other reason that you’d want to follow your Console system log from the command line, here’s all you need to type:

tail -f /var/log/system.log

You can do the same with the kernel log, which is great if you’re troubleshooting hardware and connectivity issues:

tail -f /var/log/kernel.log

The tail -f command allows the specified file to be read and printed to your screen in a live stream. There are plenty of other log files you can follow contained within /var/log but the above two are generally the most useful for troubleshooting purposes.

You could also combine these commands with GeekTool if you want to see system log activity directly on your Mac OS X desktop.

Enjoy this tip? Subscribe to the OSXDaily newsletter to get more of our great Apple tips, tricks, and important news delivered to your inbox! Enter your email address below:

Related articles:

Posted by: David Mendez in Command Line, Mac OS X

One Comment

» Comments RSS Feed

  1. sakthivel says:


    Any one tell me how to write a log in kernel extension.


Leave a Reply


Shop for Apple & Mac Deals on

Subscribe to OSXDaily

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