Booting process

  1. Bootloader loads the kernel stored in /mach_kernel (Tip: Use rEFIt as boot loader for dual booting into GNU/Linux).
  2. Kernel launches the launchd process (equivalent of init in GNU/Linux).
  3. launchd loads startup processes from several directories (/System/Library/LaunchAgents, /System/Library/LaunchDeamons, /Library/LaunchAgents, /Library/LaunchAgents and corresponding files in ~/Library directory) [source]

Directory structure

  1. /Applications – Holds actual applications. Applications are directories with “.app” extension and contain Mach-O executable and other helper files.
  2. /Library –  Similar to /etc on GNU/Linux. It contains system wide config primarily for applications under /Applications. User-specific settings end up in /Users/<username>/Applications dir.
  3. /Network – contains network mounts.
  4. /System – seems to contain system specific data which is not modified regularly
  5. /Users – Equivalent of /home on GNU/Linux
  6. /bin  – Same as GNU/Linux
  7. /sbin – Same as GNU/Linux
  8. /private – /private/tmp is same as /tmp on GNU/Linux. /private/var is same as /var on GNU/Linux. /private/etc seems to contain settings just like /etc on GNU/Linux.

Miscellaneous

  1. Correct pronunciation is “Oh-es-ten” and not “Oh-es-X” [source]
  2. Press “D” while booting up to enable diagnostic check on system.
  3. Mouseless copy in iTerm2 [source]
  4. Cheatsheet – A helper app which enables you to do a Long press of command button in any app to reveal all app shortcuts. It only works with Cocoa-based apps and most apps are Cocoa-based.
  5. Fluid – An app which converts a web page into Mac app.
  6. Mounting a disk image
    Note: Process is a bit more involved for encrypted images.
  7. To read binary plist files use plutil
  8. To set/get hostname from command-line

Further readings

  1. http://www.matisse.net/osx/darwin_commands.html
  2. http://www.mitchchn.me/2014/os-x-terminal/
  3. furbo.org/2014/09/03/the-terminal/