Posts tagged: linux

All posts with the tag "linux"

132 posts latest post 2026-09-02
Publishing rhythm
Sep 2026 | 2 posts
How to run pods as systemd services with Podman Podman is well known for its seamless integration into modern Linux systems, and supporting systemd is a cornerstone in these efforts. Linux commonly uses th... redhat.com [1] podman comes with a nice command for generating systemd service files (units). $ podman pod create --name=my-pod 635bcc5bb5aa0a45af4c2f5a508ebd6a02b93e69324197a06d02a12873b6d1f7 $ podman create --pod=my-pod --name=container-a -t centos top c04be9c4ac1c93473499571f3c2ad74deb3e0c14f4f00e89c7be3643368daf0e $ podman create --pod=my-pod --name=container-b -t centos top b42314b2deff99f5877e76058ac315b97cfb8dc40ed02f9b1b87f21a0cf2fbff $ cd $HOME/.config/systemd/user $ podman generate systemd --new --files --name my-pod /home/vrothberg/.config/systemd/user/pod-my-pod.service /home/vrothberg/.config/systemd/user/container-container-b.service /home/vrothberg/.config/systemd/user/container-container-a.service References: [1]: https://www.redhat.com/en/blog/podman-run-pods-systemd-services
GitHub - sharkdp/bat: A cat(1) clone with wings. A cat(1) clone with wings. Contribute to sharkdp/bat development by creating an account on GitHub. GitHub · github.com [1] Bat is my favorite pager, its the one for me that seems to just work more than the rest. colors, syntax highlighting, line numbers search, it just feels the most natural. References: [1]: https://github.com/sharkdp/bat
Relocating the Docker root directory If the space in the file system where the Docker root directory is located is not adequate and cannot be increased, you must relocate the directory. ibm.com [1] A very straightforward guide to moving your docker data, such as container storage to a different location. In my case I wanted it off of my boot drive. References: [1]: https://www.ibm.com/docs/en/z-logdata-analytics/5.1.0?topic=compose-relocating-docker-root-directory
GitHub - containers/aardvark-dns: Authoritative dns server for A/AAAA container records. Forwards other request to host's /etc/resolv.conf Authoritative dns server for A/AAAA container records. Forwards other request to host's /etc/resolv.conf - containers/aardvark-dns GitHub · github.com [1] I ran into some dns issues while running podman on arch, aparantly I had missed an optional dependency of aardvark-dns for container to container dns resolution. paru -S aardvark-dns References: [1]: https://github.com/containers/aardvark-dns
Podman - ArchWiki wiki.archlinux.org [1] I kept running into limits in the number of subuid and subgid’s I had on my system by default. As always thank the arch wiki guide for having the most comprehensive yet consice guide to setup podman. What I needed to do to fix the error. usermod --add-subuids 100000-165535 --add-subgids 100000-165535 username References: [1]: https://wiki.archlinux.org/title/Podman
TestDisk Step By Step CGSecurity · cgsecurity.org [1] testdisk is an amazing command line utility (interactive tui) that just saved me a hard drive that was filled with data, but every machine that I plugged it into told me that it was completely unpartitioned. References: [1]: https://www.cgsecurity.org/wiki/TestDisk_Step_By_Step
How to Manage 'Systemd' Services and Units Using 'Systemctl' in Linux Systemctl is a systemd utility which is responsible for Controlling the systemd system and service manager. Systemd is a collection of system management daemons, utilities and libraries which serve... How to Manage ‘Systemd’ Services and Units Using ‘Systemctl’ in Linux · tecmint.com [1] A fantastic overview of the systemd cli. References: [1]: https://www.tecmint.com/manage-services-using-systemd-and-systemctl-in-linux/
How to fix ZFS pool not importing at boot You have probably tried Stack Exchange and reddit at this point, so what do you have to lose? ./techtipsy · ounapuu.ee [1] Hacky solution to get zpool import tank to work on boot right away. This has been an issue that has plagued my system for months and no matter what dependencies I add in it never works, but adding a sleep as ExecStartPre did the trick. References: [1]: https://ounapuu.ee/posts/2021/02/01/how-to-fix-zfs-pool-not-importing-at-boot/
Deleting Specific Lines in a File with sed or yq — Nick Janetakis We Nick Janetakis · nickjanetakis.com [1] sed can be a tricky beast, I often stumble when trying to pipe into it. Next time I need to use sed, I should reference this article by Nick Janetakis. He makes it looks much easier than my experience has been, and it appears to behave like a vim :%s/ substitution does, or a g/ g command. References: [1]: https://nickjanetakis.com/blog/deleting-specific-lines-in-a-file-with-sed-or-yq
gistfile1.txt [1] text On void linux. Under `/etc/containers/` there is a file called `registries.conf`. It is complemented by `man 5 containers-registries.conf`. Change (for me lines 11-12) which say [registries.search] registries = [] to [registries.search] registries = ['docker.io'] (drawn from https://www.projectatomic.io/blog/2018/05/podman-tls/) --- Without the above you won’t be able to use basic podman functions. You might get errors like: - Error: unable to pull fedora:28: image name provided is a short name and no search registries are defined in the registries config file. - Error: unable to pull stripe/stripe-cli: image name provided is a short name and no search registries are defined in the registries config file. --- Various documentation (redhat blog entries, man podman pages) say that dockerhub is a default, but without this step it’s clearly not. Good luck. Feel free to use the comment box below if you have a github account. By default podman will not pull images from docker.io and will need setup. This guide worked for me. References: [1]: https://gist.github.com/isomorphisms/3114ab86960656a729a6b4653001aae2
🛠️ Installation | LazyVim You can find a starter template for LazyVim here lazyvim.org [1] Lately in 2023 I have been leaning on lazyvim for my new setups where I am not necessarily ready to drop my full config. It’s been pretty solid, and comes with a very nice setup out of the box, the docs are pretty fantastic as well. References: [1]: https://www.lazyvim.org/installation

AUR.">paru is an aur helper that allows you to use a package manager to install packages from the aur.

What’s the Aur #

The Aur is a set of community managed packages that can be installed on arch based distros.

Why a helper? #

paru just makes it easy, no clone and run makepkg. You can do everything paru can do using the built in pacman installer.

Manual Install from the Aur #

You will need to manually instal pacman from the aur in order to get started.

sudo pacman -S --needed base-devel
git clone https://aur.archlinux.org/paru.git
cd paru
makepkg -si

Installing packages with paru #

Once setup you are ready to install packages from the AUR just like the core repos.

# you can update your system using paru
paru -Syu

# you can install packages from the AUR
paru -S tailscale
paru -S prismlauncher

# even core repo packages can be installed
paru -S docker

Paru in Docker #

Here is a snippet from my devtainer dockerfile. Where I use paru to install packages from the AUR inside of a dockerfile.

FROM archlinux

RUN echo '[multilib]' >> /etc/pacman.conf && \
    echo 'Include = /etc/pacman.d/mirrorlist' >> /etc/pacman.conf && \
    pacman --noconfirm -Syyu && \
    pacman --noconfirm -S base-devel git && \
    groupadd --gid 1000 devtainer && \
    useradd --uid 1000 --gid 1000 -m -r -s /bin/bash devtainer && \
    passwd -d devtainer && \
    echo 'devtainer ALL=(ALL) ALL' > /etc/sudoers.d/devtainer && \
    mkdir -p /home/devtainer/.gnupg && \
    echo 'standard-resolver' > /home/devtainer/.gnupg/dirmngr.conf && \
    chown -R devtainer:devtainer /home/devtainer && \
    mkdir /build && \
    chown -R devtainer:devtainer /build && \
    cd /build && \
    sudo -u devtainer git clone --depth 1 https://aur.archlinux.org/paru.git && \
    cd paru && \
    sudo -u devtainer makepkg --noconfirm -si && \
    sed -i 's/#RemoveMake/RemoveMake/g' /etc/paru.conf && \
    pacman -Qtdq | xargs -r pacman --noconfirm -Rcns && \
    rm -rf /home/devtainer/.cache && \
    rm -rf /build

USER devtainer
RUN sudo -u devtainer paru --noconfirm --skipreview --useask -S \
    bat \
    cargo \
    direnv \
    dua-cli \
    dust \
    fd

Final Thoughts #

There are other options out there, paru seemed to be the most supported at the time I started using arch and there has been no other reason for me to change it. It’s treated me well for nearly a year now.

useful btrfs tools

disk usage # [1] Looking at disk usage on any of these must be done using a tool built for it if you want an accurate measurement. General purpose tools like du will be inaccurate as they do not count things like duplicate copies in snapshots. ❯ sudo btrfs fi usage -T / [sudo] password for waylon: Overall: Device size: 465.26GiB Device allocated: 251.06GiB Device unallocated: 214.20GiB Device missing: 0.00B Device slack: 0.00B Used: 234.44GiB Free (estimated): 227.37GiB (min: 120.27GiB) Free (statfs, df): 227.37GiB Data ratio: 1.00 Metadata ratio: 2.00 Global reserve: 478.88MiB (used: 0.00B) Multiple profiles: no Data Metadata System Id Path single DUP DUP Unallocated Total Slack -- -------------- --------- -------- -------- ----------- --------- ----- 1 /dev/nvme1n1p2 239.00GiB 12.00GiB 64.00MiB 214.20GiB 465.26GiB - -- -------------- --------- -------- -------- ----------- --------- ----- Total 239.00GiB 6.00GiB 32.00MiB 214.20GiB 465.26GiB 0.00B Used 225.82GiB ...
1 min read

Fix Arch Linux randomly rejecting passwords with one command. Try ‘faillock –user $USER’ to reset login counter and regain access. Quick solution for a smooth computing"

an intertwined mess of wires

If you’re an Arch Linux user, you may have experienced a frustrating issue where your password is randomly not being accepted by the system. This can be a major inconvenience and can cause a lot of frustration, especially if it happens frequently.

The good news is that there is a simple fix for this issue. The following bash code can be used to fix the problem:

bash faillock --user $USER

This command is used to reset the failed login count for the current user. By running this command, you will be able to reset the system’s login counter and regain access to your account.

It’s important to note that this command should only be used as a temporary solution. If you find yourself frequently having to run this command, it’s likely that there is a deeper issue with your system that needs to be addressed.

In any case, if you’re experiencing problems with your Arch Linux system not accepting your password, give the above command a try and see if it resolves the issue for you.

I recently setup some vm’s on my main machine and got sick of signing in with passwords.

ssh-keygen
ssh-copy-id -i ~/.ssh/id_rsa.pub virt

I just shared some ssh keys with myself and ran into this error telling me that I did not set the correct permissions on my key.

@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@         WARNING: UNPROTECTED PRIVATE KEY FILE!          @
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
Permissions 0750 for '/home/waylon/.ssh/id_*******' are too open.
It is required that your private key files are NOT accessible by others.
This private key will be ignored.
Load key "/home/waylon/.ssh/id_*******": bad Permissions
repo: Permission denied (publickey,gssapi-keyex,gssapi-with-mic).
fatal: Could not read from remote repository.

Please make sure you have the correct access rights
and the repository exists.

I changed them with the following commands.

chmod 644 ~/.ssh/id_*******.pub
chmod 600 ~/.ssh/id_*******

For far too long I have had to fidget with v4l2oloopback after reboot. I’ve had this happen on ubuntu 18.04, 22.04, and arch.

After a reboot the start virtual camera button won’t work, It appears and is clickable, but never turns on. Until I run this command.

sudo modprobe v4l2loopback video_nr=10 card_label="OBS Video Source" exclusive_caps=1
“cell shaded, long, full body, shot of a cybernetic blue soldier with glowing pink eyes looking into a selfie camera with ring light, llustration, post grunge, 4 k, warm colors, cinematic dramatic atmosphere, sharp focus, pink glowing volumetric lighting, concept art by josan gonzales and wlop, by james jean, Victo ngai, David Rubín, Mike Mignola, Laurie Greasley, highly detailed, sharp focus,alien,Trending on Artstation, HQ, deviantart, art by artgem” -s50 -W832 -H416 -C12.0 -Ak_lms -S373882614

Today I learned that you can turn on kernel modules through some files in /etc/modules...

This is what I did to my arch system to get it to work right after boot.

echo "v4l2loopback" | sudo tee /etc/modules-load.d/v4l2loopback.conf
echo "options v4l2loopback video_nr=10 card_label=\"OBS Video Source\" exclusive_caps=1" | sudo tee /etc/modprobe.d/v4l2loopback.conf

Setting up snapper on Arch

https://www.youtube.com/watch?v=_97JOyC1o2o snapper snap-pac grub-btrfs Note # [1] These are mostly my notes to remind myself, I’d Highly reccomend watching this-video [2] or reading this arch wiki page [3] /.snapshots already exists error # [4] When I started running sudo snapper -c root create-config / I ran into the following error. [5] Creating config failed (creating btrfs subvolume .snapshots failed since it already exists). remove existing snapshots # [6] sudo umount /.snapshots sudo rm -r /.snapshots configure snapper # [7] sudo snapper -c root create-config / sudo snapper -c home create-config /home btrfs subvolumes # [8] sudo btrfs subvolume list / [9] sudo btrfs subvolume delete /.snapshots sudo mkdir /.snapshots # [10] # you might not see snapshots mounted yet lsblk # if you check fstab you will see an entry for it cat /etc/fstab # mount it sudo mount -a # now you should see /.snapshots mounted lsblk You should now see .snapshots in mountpoints. [11...
1 min read

The one reason I switched to arch

The community, that’s it, end of post, roll the credits. I’m a tinkerer # [1] I am a tinkerer, I am not going to run a stock desktop manager, mostly becuase that’s just not how my brain works. I need to tweak everything to fit my needs. Grantid I have not spent much time in many full fledged linux desktop environments. They are far more customizable than windows ever will be, I absolutely love that about them. Inevitibly I end up in a situation where I hit a wall, it just won’t do what I want it to do, or my lack of understanding what came wtih it holds me back. minimal # [2] I love minimal installs. I love just building up my system from the bottom up with things that I like, I understand, and that I can script. I’m a noob # [3] I spend a lot of my time in the terminal. I’d like to think I know how to use a linux command line for software development really well, but there are a lot of things that I still dont know all that well, mostly because I don’t need to. The AUR # [5]...