Booting process
- The bootloader loads the kernel stored in /mach_kernel. Tip: Use rEFIt as a bootloader for dual booting into GNU/Linux.
- Kernel launches the launchd process which is equivalent of init in GNU/Linux.
- launchd loads startup processes from several directories (/System/Library/LaunchAgents, /System/Library/LaunchDeamons, /Library/LaunchAgents, /Library/LaunchAgents and corresponding files in ~/Library directory)
Directory structure
- /Applications – Holds actual applications. Applications are directories with “.app” extension and contain Mach-O executable and other helper files.
- /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.
- /Network – contains network mounts.
- /System – seems to contain system specific data which is not modified regularly
- /Users – Equivalent of /home on GNU/Linux
- /bin – Same as GNU/Linux
- /sbin – Same as GNU/Linux
- /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
- The correct pronunciation is “Oh-es-ten” and not “Oh-es-X”.
- Press “D” while booting up to enable diagnostic checks on the system.
- Mouseless copy in iTerm2 [source]
- Cheatsheet – A helper app that 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.
- Fluid – An app that converts a web page into a Mac app.
- Mounting a disk image
Note: The process is a bit more involved with encrypted images.$ hdiutil mount image.iso
- To read binary plist files use plutil
$ sudo plutil -p /private/var/db/dslocal/nodes/Default/users/root.plist
- To set/get the hostname from command-line
$ scutil --get HostName $ scutil --set HostName NewHostName