Ask HN: New job is having me switch from Linux to Mac – how do I cope?
I've been using Linux over 15 years, and since 2005 I've been at startups where I controlled my destiny and ran whatever the heck I wanted on my work computer (typically Linux Mint Debian Edition on a Lenovo.)
Well, I took a new job and it starts on Monday (5/4). And part of that job is using the machine I'm given. As is. Which means a MBP running OS X.
Any real world tips that you can give me to ease the change?
41 comments
[ 3.0 ms ] story [ 96.3 ms ] threadOther than that, use iTerm2[0], Homebrew[1] and Cask[2], this'll kickstart your CLI env in the right direction.
Yes it's not the most featureful terminal emulator in existence but it's well put together and works just fine.
And I suspect most others have similar reasons.
It's an OK default, but for real work it drives me batty to keep hitting the limitations it imposes. Sure, I could rebind everything and move to tmux in the terminal itself, but why, when iTerm2 is free and still frequently updated?
The tmux integration offered by iTerm2 is also pretty handy if you spend any amount of time on remote servers.
Be sure to change your default path to put /usr/local/bin first, so that all of the brewy and other goodness you install is actually picked up - and, if you install a more up to date bash, be sure to change your shell: System Preferences, Users and Groups, "two-finger" or "right click" on your name in the list on the left, advanced options....
I'm happy with the default terminal, works well enough.
EDIT: Not sure whether you will also need to change the default shell used by Terminal: start Terminal, Terminal, Preferences....
Once you get a terminal to your liking, it should make things less obtuse and let you get a feel for the operating system.
One day, in a moment of frustration, when Libre or Open or Braindead Office got too much in my way, I slammed the lid down, yelled "I'll be back in an hour", had my own MBA set up and working to my liking 90 minutes later, and haven't looked back.
However, I felt bad for only about two minutes, and then forgot about that until I read your comment.
sigh
And the package mangement is iffy, at least as far as GUI applications go. For the command-line, a lot of people swear by package managers like Homebrew, probably because they also help resolve the "no GNU extensions" problem. While I don't use OS X enough to have any experience with this, I think this would be the key area for me to investigate to before I'd be comfortable using OS X as an everyday system. The rest is just getting comfortable with the keybindings/modifier key layout.
To elaborate on the modifier keys, from the inside out: Command key for GUI shortcuts (⌘C, ⌘V); Option (same as Alt); and Control. Both Option and Control are rarely used by themselves (though the Option key can be used for special characters and the Control key can be used for Emacs-style editing shortcuts) and can pass through in Terminal -- this is where the separate Command key really shines.
Oh, and the window manager. Coming from Linux, one of the strangest things about OS X is probably the application-oriented focus model (rather than window-oriented). As the parent mentions, this manifests itself in both the dock (clicking on an icon in the dock raises the whole application) and the hotkeys (Command-Tab to switch applications, Command-Backquote to switch windows within an application). This takes some getting used to, but like with the keyboard shortcuts, it should only take a day or two. On the other hand, the OS X implementation of workspaces is very good, especially if you decide to run a VM.
So to summarize, OS X is still a real UNIX system with a real command-line (and development tools are literally one click away -- type gcc or make or git into Terminal, and then click Install). It just has a slightly odd desktop environment on top, but that shouldn't be too hard to get used to.
I used to be a die-hard Arch user who would never consider even buying a mac. Was given a macbook at an internship and haven't looked back... Well, I have. I love it though. Give it a month to start getting productive though.
As Revell said, Homebrew is a must-have. (Also fish[1], but that applies to Linux too).
[1] http://fishshell.com/
Last I checked it was maintained by one guy, meaning support isn't always great.
I still use bash for scripting (can't get away from it) and when compatibility is an issue.
[1] https://github.com/bpinto/oh-my-fish
You can use browser on the Mac if you want to be able to use the latest and greatest firefox/Chrome but for coding and software nothing beats Linux. All the OS X brew/ports etc are just not good enough compared to apt-get.
You can run the VM using VirtualBox in background mode too and then just ssh to it using the Terminal.app or iTerm.app on OS X.
Copy-paste works really well on iTerm so you can copy-paste links from your OS X browser like Firefox/Chrome to the ssh terminal and use it in case you download software using wget/curl sometimes.
For email, Thunderbird/Mail.app both work really well on OS X and that should be good enough unless you want mutt, which you can then use from your Linux VM.
Most likely your production environment is Linux, esp. if you're in a company that is giving you Macs so most likely web development. Even better if you mimic your production environment in your VM and develop on that instead of developing on a non-standard environment like OS X and then hoping stuff works in production. (Tons of devs do this and it makes no sense.)
Although, saying this, there's no reason the OP can't just install Linux over (or alongside) OS X.
You'll need to find alternatives to /sys and /proc. Services are managed with launchctl, which is kind of a pain. X Window support is there but clunky. And so on.
While you're living in a console, working on your own code, though, things are close enough to forget about most of the time.
Best of luck!
And that if you're used to BSD ... it's weird as BSDs go. (Just little things, but I found it slightly jarring in practice.)
at my dayjob I'm using an iMac and managing my virtual machines using Vagrant which loads an image of an Ubuntu Linux machine (same distro as used on our production servers). its a convenient setup in several ways. This keeps my dev environment a close match to the prod environment, and it lets me install packages quickly and easily for development using the usual Linux tools. I also get to continue using the superb desktop interface that OSX provides.
Good luck in your new job.
You will likely find the transition to be jarringly pleasant. To ween yourself off of linux, continue to use a VM on your MBP (I used vmware) to run your favorite distro.
Keep calm and carry on.
I tend to run them headless (Shift-Click in VirtualBox) mapping my dev folder using samba (Command-K in Finder maps to a samba drive) and ssh into the VM's CLI using iTerm.
It's a great way to retain environments at the end of projects.
Would love to hear your thoughts after a month? The good and bad obviously...
- Spaces are akin to Workspaces (Three finger left/right swipe) and are great for running VM's fullscreen.
- Use gestures (Two finger/Three finger Left/Right/Up/Down swipe or grab/spread)
- Spotlight (Command-Space) is handy
- Give Safari a fair try but you mightn't like it (I switched from Chrome last year and am loving it)
- I never use Launchpad (Grab gesture)
Do you have the powerpack? Is it useful?
Once I sorted that out it was a relatively pleasant experience.
You might also want to install SmoothMouse (http://smoothmouse.com/) which tames OSX's ferocious mouse acceleration curve, and reduces the delay between moving the mouse and the screen updating to be imperceptible
Lots of great advice here, but I still remember being surprised that on OS X (and BSDs I think?) a trailing slash in a directory name is significant, e.g. here:
http://hints.macworld.com/article.php?story=2005111210000737...
Keep that in mind when running `cp` etc.
All the terminal thoughts mentioned above are good although there are still some weird BSD idiosyncrasies that you'll have to cope with (cp missing the link switch, find requiring an explicit target, etc) Ive also been using tmux and it makes the default terminal a bit more bearable.
Here are my biggest gripes thus far switching from Debian Jessie with KDE:
- The window management is laughably bad in OSX. I installed two extensions (divvy and cinch) to add window docking functionality which helps slightly but they are free only in that they pop up requests to pay every once in a while. Apparently there are some better extensions but they cost money and its my opinion that my workflow is my employers problem, not my monetary responsibility.
- Using virtual desktops on OSX after becoming accustomed to the Linux implementation sucks. Its is far less featured than KDE (at least out of the box) and a lot of the extensions to make it better seem to cost money. The desktop switching order is linear and it randomly changes the ordering on you while you are using it. There is also no concept of docking a window across desktops or opening a window on multiple. In fact, when you maximize a window it switches desktops on you.
- The firmware for the thunderbolt display is terrible. The USB ports keep shutting off randomly requiring you to unplug and replug the thunderbolt. Doing this totally screws up all your window sizes and placements. I generally have a full screen terminal on a virtual desktop and it causes it to underscan the window until I close and reopen it. Extremely irritating.
- I don't really like the focus management in OSX but this is more a minor UX irritation. My issue involves clicking on a text field inside a different application and instead of having the text field gain focus, the application gains focus but not the internal text field. Many a time have I entered text into the wrong entry field in the browser.
All this being said, Apple hardware is really excellent. Some of the peripherals are a little bit too 'designed' and not as functional but they are not unmanageable. The software needs some help and I still may switch to Linux in a VM at some point. For now I figure that I might as well give OSX a chance before I completely bail on it. The Apple fanboys would never let me hear the end of it.
* Remap Command and Control if your fingers can't adjust to the change in shortcuts. System Preferences > Keyboard > Modifier Keys
* If you want TAB to work with all widgets (which is what makes sense to me): System Preferences > Keyboard > Shortcuts > Full Keyboard Access: All Controls
* Not sure where a menu command lives? Search for it in the Help menu's Search field.
* Spotlight is a pretty good launcher, calculator, and more. Command+Space is your friend.
* If you need additional keyboard remapping support: [Karabiner](https://pqrs.org/osx/karabiner/) and [Seil](https://pqrs.org/osx/karabiner/seil.html.en)
* Time Machine is your friend.
* Grab [iTerm2](http://iterm2.com). Apple's terminal is nice, but iTerm2 has so much more. If you use tmux, iTerm2 has support for that, too.
* Install [Homebrew](http://brew.sh) for package management.
* [TotalSpaces 2](http://totalspaces.binaryage.com) gives you even more control over how your spaces are arranged, animations between them, and keystrokes for accessing them. Can't live without it anymore.
* Window management sucks. I use [Moom](http://manytricks.com/moom/)
* I've given up on Apple's Mail.app. I use Gmail, and [AirMail 2](http://airmailapp.com) does the trick for me.
* Use virtual machines where appropriate (VirtualBox, VMWare, Parallels, ...)
* Install your preferred shell if Bash isn't your cup of tea. I use [Fish](http://fishshell.com)
* [F.lux](https://justgetflux.com) is your eye's best friend.
* [Bartender](http://www.macbartender.com) keeps all those pesky menu items under control
* If you want to really customize your gestures and the like, [BetterTouchTool](http://www.bettertouchtool.net) can be useful. For awhile I had my "Windows+E" muscle memory tied to launching a new Finder window until I got over it.
Good luck! Give it about a week or so (if that), and you should be comfortable in your new environment.