Switching to Linux
Notes from a former Windows user
February 16, 2023 · Felipe Vogel ·- Why Linux?
- Installing Linux Mint
- Payoff #1: a lovely terminal
- Payoff #2: more time spent on the keyboard, less on the mouse
- What about AutoHotkey?
- Conclusion: an educational change
- Next steps
I did it. I finally switched to Linux 🐧 Here’s how it went and what I learned!
Why Linux?
Until a few days ago, I was a longtime Windows user. Recently at work I’ve been using an obligatory MacBook Pro, but otherwise I still preferred my PC with Windows, mainly because I was used to it, but also because Windows provides WSL (Windows Subsystem for Linux), which I’ve found to be less troublesome for development than MacOS.
But WSL has limitations. Running graphical Linux apps, while possible, is not pretty. Worse, WSL uses a lot of memory, and lately I’ve been having to restart it after a few hours’ use due to what seems to be a memory leak. Yikes!
Plus, Windows itself is a pain. To point to a well-known example, it’s been increasingly difficult to find where to change a simple setting in Windows, amid the proliferation of new and half-finished settings UIs.
So I thought, why not switch to pure, unadulterated Linux?
Installing Linux Mint
I chose Linux Mint because it has a familiar Windows-like UI, and it’s right up there with Ubuntu as one of the commonly-recommended distros for beginners.
As I installed it on my Alienware m15 R4, I had to do only a few things out of the ordinary:
- The Mint installer complained about Intel RST. To disable it, I opened up BIOS settings and switched from RAID to AHCI. I still wanted to use both my physical drives as one logical unit (i.e. RAID0), so I installed Mint using LVM, following this guide.
- After installation, I decided to go into BIOS settings and disable Secure Boot, because it’s a pain to have to enter a password when I install certain drivers. And for the average Linux desktop user, Secure Boot is more trouble than it’s worth (sources: 1, 2).
- To prevent screen tearing on my external monitor, I had to open up NVIDIA settings via the tray icon and switch to “Performance Mode”.
- Bash was having issues wrapping lines, so I installed Zsh and that fixed the problem.
- I fixed a few other annoyances with my dotfiles and startup scripts. (Here are all the rest of my Linux scripts.)
So the switch took some time, but I’m already seeing a payoff in two areas: a lovely terminal, and more time spent on the keyboard. Of course, neither of these is unique to Linux, and I’m bringing these lessons back to MacOS—but somehow it was easier for me to make these discoveries in Linux.
Payoff #1: a lovely terminal
Along with Zsh, I installed Oh My Zsh and a bunch of handy plugins:
- copybuffer
- copyfile
- copypath
- gitfast
- rake-fast
- sudo
- thefuck
- zsh-autosuggestions
- zsh-navigation-tools
- zsh-z
I also copied some aliases from the git and rails plugins.
Next, I cobbled together key bindings to enable Shift selection on the command line. Just this one improvement takes a lot of the pain out of the terminal for me, because now I can edit text on the command line much as I do everywhere else.
Payoff #2: more time spent on the keyboard, less on the mouse
I have a history of wrist pain from being on the computer all day long. Taking breaks and stretching helps, but ultimately I need to use the mouse less, and keyboard shortcuts more.
Switching to a new OS is the perfect time to look for more ways to stay on the keyboard, and in Linux it’s actually pretty easy since nearly everything is customizable.
Besides Mint’s keyboard shortcut settings UI and my now-likable terminal, I’ve found a few other tools that help me stay on the keyboard:
- My Keyboardio Atreus keyboard. I’ve had it for a while now, but it’s worth mentioning because I love it so much, and now I’ve further customized its layout to make keyboard-only navigation easier.
- Vimium Chrome/Firefox extension. Navigate the web with your keyboard!
- Caret browsing (F7 in most browsers). Vimium also has a visual mode if you prefer vim-style shortcuts.
- Espanso text expander.
- Porcellite clipboard manager. Despite being apparently unmaintained (the last update was in 2017), it’s my favorite one. Its search function is not as good as in Ditto (which is Windows-only), but otherwise Porcellite is perfect.
- The compose key for typing Unicode characters.
Soon I’ll have to challenge myself to see how long I can go without my mouse. Maybe stick it in a drawer on the other side of the house? 😈
What about AutoHotkey?
On Windows I was a big fan of AutoHotkey. There’s no equivalent in Linux, except for in-progress projects (AHK_X11 and Keysharp).
But you know what? I’m not missing AutoHotkey. Most of what I did in AutoHotkey, I can now do via keyboard shortcuts and/or scripts. And anyway, most of my AutoHotkey shortcuts were for my mouse, which (as I now see in retrospect) did more harm than good.
Conclusion: an educational change
There are a few things that it’ll take me a long time to get used to in Linux, such as the confusing filesystem hierarchy. (At least I’m comforted in seeing I’m not the only one who is unimpressed by the common rationalizations for it. There’s even a Linux distro that abandons the standard filesystem hierarchy altogether.)
But on the whole it’s been a surprisingly enjoyable switch. Not because it was a perfect experience out of the box, but because as I’m customizing and fixing things, I’m improving my scripting skills and learning how Linux works under the hood.
MacOS and (especially) Windows are more opaque, in my experience. In Windows my tools of customization were AutoHotkey and other free utilities, and in Mac I use an assortment of (usually) paid apps to get a similar effect. But I don’t gain anything from these tools beyond the immediate problem being fixed. I don’t learn very much from them.
But in Linux I get to customize the OS in the same way that I do programming. (By Googling for hours and tweaking what I copy-paste until something works 😂) And in the end, as I look with pride on the barely-significant thing that I’ve fixed or adjusted, I realize that the tidbits of Linux knowledge I’ve picked up along the way may be just as valuable as end result. Already I’ve had a few “lightbulb moments” when some Unix-related features of Ruby finally made sense, and I’m sure more of those moments are to come—the whole Internet runs on Linux servers, after all, so learning more about Linux can only help me as a developer.
Next steps
Where to go from here? My plan is to keep using Linux and learning more about it.
And now that I have a graphical Linux environment for development, the way is open for me to try out the DragonRuby Game Toolkit… (cue ominous music).