Encrypted Filesystems with Sparse Bundles
Mac OS X offers encrypted filesystems through sparse bundles. To mount up a sparse bundle, given the password used to create the bundle, use the hdiutil:
hdiutil attach -verbose -readonly /path/to/sparse.bundle.directory
This will mount up the sparse bundle located at the directory path specified. To unmount the sparse bundle, use:
hdiutil detach /Volume/sparse.bundle.name
Adding entries to /etc/hosts
Although simply editing /etc/hosts should work, there are times where the new entries may not be recognized, in these cases the OS X name cache daemon needs to be kicked:
dscacheutil -flushcache
Mac OS X Hostnames
Although you can change the hostname of your Mac OS X device through the System Control Panel -> Sharing, the following command line can lock the name so DHCP and other dynamic networking protocols don’t mess up your hostname (from RichardBronosky):
sudo hostname my-permanent-name
sudo scutil –set LocalHostName $(hostname)
sudo scutil –set HostName $(hostname)