systemd.mount replacing autofs

I have been a very satisfied user of autofs for several years. Using a laptop in multiple location without reboot, could often cause annoying timeouts with hard mounted NFS shares. So I found autofs, which did a great job, especially the ghost option is nice, making you able to browse the filesystem when it’s not…

Continue Reading

Move the docker data directory

The default location for the docker data directory, when using overlay2 storage driver is /var/lib/docker. Maybe you want to move it to another location, and it’s actually pretty easy. Stop the docker service: sudo systemctl stop docker.service Copy the docker folder to the new location:sudo cp -rp /var/lib/docker /path/to/new/locationThe p in -rp will preserve ownership,…

Continue Reading

Windows 10 missing ssh-copy-id

Microsoft is finally shipping Windows with SSH. On my Windows 10 machine, it’s OpenSSH: PS C:\Users\Kasper> ssh -VOpenSSH_for_Windows_7.7p1, LibreSSL 2.6.5 Somehow they missed to get the ssh-copy-id tool implemented, so we need to find another way of copying our ssh keys. Thankfully it’s not that complicated, we can use powershell (probably even cmd) cat .\.ssh\id_rsa.pub…

Continue Reading

Postgresql not listening on docker interface after reboot

/etc/postgresql/12/main/postgresql.conf is where you define the interfaces for postgresql to listen on. It’s done with the line “listen_interfaces =”So, to get postgresql to listen on a docker interface, you have to add the IP address to the configuration: This will make postgresql listen after connections from my docker container. Unfortunately when i rebooted the machine,…

Continue Reading

Ping not permitted in WSL

Using Windows subsystem for Linux (WSL) is so nice, when you are forced to work from an inferior OS, sometimes also referred to as “a gaming console”Especially combined with the Windows Terminal, which I wrote about here: https://www.nordal-lund.dk/?p=592 I’m sure that most Linux/Unix administrators will feel right at home. Despite all the goodness, there are…

Continue Reading