Ease Switching Between OS X and Linux Environments for Development
As I may have pointed out in a previous post, I’ve switched all my non-server computers over to OSX. My desktop is OSX and dual boots Windows (for very few things). My latptop, my development machine, dual boots OSX and Linux. Each instance of OSX has Virtual Box and Windows XP as well as Linux, the mentality that for simple Windows and Linux things where OSX wouldn’t/couldn’t work, I can use a VM. For 99% of the time, that works. Ultimately I switch into the secondary OSes only when I need to access the hardware natively.
One issue I’d run into switching between OSX and Linux for development - and one thing that really bothered me - is OSX’s home directory is /Users while any Linux box is /home. Call me lazy for not having a better way to manage configuration files but I didn’t want to manage configuration files. I finally decided that my OSX box should probably match my Linux box in terms of directory structure, at least superficially. I backed up the current /home directory on OSX and created a symlink to /Users so that /home -> /Users.
I don’t know if this is a bad thing or not, so try this at your own risk, but so far for me, I like it. I don’t know what’s taken me so long to do this.
These commands backup your current /home to /home_bkup, in case you ever need it again. Why? I don’t know.
cd /
sudo mv home/ home_bkup
This creates the symlink.
sudo ln -s /Users/ /home