Writing Bash Scripts that aren't Only Bash: Checking for Bashisms and Using Dash

Terminal window image

Shells like Bash or Zsh are advanced and user-friendly, and include features beyond what a simpler POSIX-compliant shell might offer. You will do well to utilize the full features of your shell when writing scripts.

There are situations, however, when portability should be a valued feature, allowing the script to run on a variety of shells. ...more

February 21, 2021 Updated: July 02, 2023 [Linux] #bash #shell #posix

You may not need systemd on WSL

To systemd or not to systemd...

Most popular Linux distributions use systemd as the init system. It is like a Swiss-army knife that controls startup, shutdown, service monitoring, and so much more.

In late 2022 Microsoft announced systemd support in WSL.

Prior to that point, however, Windows Subsystem for Linux (WSL) danced to its own initialization tune, and distros running on WSL did not use systemd, and did not generally employ a traditional init system.

This taught folks like me something: I don’t always need to have systemd or other init system for a good Linux experience. Running WSL without systemd is OK. ...more

September 10, 2020 Updated: June 26, 2023 [Linux] #wsl #windows #linux #systemd

Linux on the Dell XPS: Fixing AX201 Wi-Fi performance

📶 💤

I am very happy with Linux on my Dell XPS 13 9310. I use the latest version of Fedora (38 at the time of this writing).

However, the Wi-Fi connection gave me great difficulty for months before I learned that performance is much better with the power saving functionality turned off. With power saving on, I would often lose packets right and left. Here are the steps to fix this. ...more

April 06, 2022 Updated: June 24, 2023 [Linux] #config #wifi #linux