★ SSH plus tmux automatically

One of the most classic sysadmin/DevOps tasks is to use secure shell to connect to remote machines. To persist those connections, a terminal multiplexer is often used, tmux and screen being the two most popular ones. In this post I will cover a few different client-side and server-side ways to have ssh automatically spawn tmux upon connection. ...

February 13, 2022 · 624 words · Thiago Perrotta

nix-shell in a nutshell

As soon as we finish installing Nix on Darwin, we’re greeted with a call to action: Alright! We're done! Try it! Open a new terminal, and type: $ nix-shell -p nix-info --run "nix-info -m" Thank you for using this installer. If you have any feedback or need help, don't hesitate: You can open an issue at https://github.com/nixos/nix/issues ...

February 10, 2022 · 395 words · Thiago Perrotta

Doas: bridging the sudo gap

doas is a lightweight and safer replacement for sudo. In most occasions you invoke it exactly like sudo: $ sudo apt install <foo> $ doas apt install <foo> doas has gained popularity recently. Besides being the default in OpenBSD, Alpine Linux 3.15 (released last year) has also switched to it: doas is the default temporary privilege escalation tool. You are advised to migrate from sudo to doas as 3.15 will be the last release to support sudo throughout its full lifecycle, in 3.16 sudo will be moved from main to community. It’s not very difficult to get used to it, however you may still find yourself writing sudo occasionally. This post highlights a few ways to bridge that gap. ...

February 7, 2022 · 412 words · Thiago Perrotta

Transfer bash history to zsh

After years of using bash as my default interactive shell at $DAYJOB, I decided to switch to zsh. I didn’t want to start from scratch and lose all my history though: $ wc -l ~/.bash_history | cut -f1 -d' ' 64002 Thus my goal was to first migrate all my history from bash to zsh. ...

February 4, 2022 · 208 words · Thiago Perrotta

Linux swap shenanigans

In this post we will cover a few linux swap recipes. ...

February 1, 2022 · 544 words · Thiago Perrotta

★ systemd: share environment variables with xorg

In this post we will learn how to share environment variables (e.g. $GDK_SCALE) between a system user session and X11/Xorg. ...

January 31, 2022 · 620 words · Thiago Perrotta

★ Watch files and react to changes during development

This post describes some tooling usages to watch for file changes and run or reload a command whenever they happen. ...

January 30, 2022 · 511 words · Thiago Perrotta

Linux: Remount device with different options

A few recipes for remounting linux devices / disks. It mostly boils down to running mount -o remount as root. ...

January 29, 2022 · 117 words · Thiago Perrotta

ChromeOS hterm: customize fonts

ChromeOS hterm (“Secure Shell extension”) is one of my favorite chrome extensions. It is a bit dull with its out-of-the-box monospace font though. In this post we’ll learn how to customize it. ...

January 26, 2022 · 329 words · Thiago Perrotta

Pihole: Add custom DNS mappings

This post covers how to add DNS entries / mappings to a local network managed with pihole. ...

January 25, 2022 · 229 words · Thiago Perrotta