Posts tagged: linux

All posts with the tag "linux"

123 posts latest post 2026-04-18
Publishing rhythm
Mar 2026 | 1 posts

useful btrfs tools

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 4.31GiB 64.00KiB...

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"

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

...

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

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.

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

The one reason I switched to arch

The community, that’s it, end of post, roll the credits.

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.

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.

...

xrandr is a great cli to manage your windows in a linux distro using x11, which is most of them. The issue is that I can never remember all the flags to the command, and if you are using it with something like a laptop using a dock the names of all the displays tend to change every time you redock. This makes it really hard to make scripts that work right every time.

Check out the deresmos/xrandr-manager for more details on it.

xrander-manager is a python cli application that is simply a nice interface into xrandr. So you must have xrandr already installed, which is generally just there on any x11 window manager, I’ve never had to install it.

As with any python cli that is indended to be used as a global/system level cli application I always install them with pipx. This automates the process of creating a

I really like the super clean look of no status menus, no url bar, no bookmarks bar, nothing. Don’t get me wrong these things are useful, but honestly they take up screen real estate and I RARELY look at them. What I really want is a toggle hotkey. I found this one from one of DT’s youtube video’s. I can now tap xx and both the status bar at the botton and the address bar at the top disappear.

I recently was unable to boot into my home Linux Desktop, it got stuck at diskcheck fsck. I found that I was able to get in to a tty through a hotkey.

https://twitter.com/_WaylonWalker/status/1512281106120384519

There’s probably more to it, but to me its a full screen terminal with zero gui, not even your gui fonts. It does log into your default shell so if you have a comfy command line setup it will be here for you even though it looks much different without fonts and full colorspace.

Normally you have 6 TTY’s running, the first is dedicated to your desktop manager, which is your login screen it might be something like gdm or lightdm.

...

This morning I was trying to install a modpack on my minecraft server after getting a zip file, and its quite painful when I unzip everything in the current directory rather than the directory it belongs in.

So I’ve been struggling to get mods installed on linux lately and the easiest way to download the entire pack rather than each mod one by one seems to be to use the overwolf application on windows. Once I have the modpack I can start myself a small mod-server by zipping it, putting it in a mod-server directory and running a python http.server

python -m http.server

Downoading on the server #

Then I go back to my server and download the modpack with wget.

wget 10.0.0.171:8000/One%2BBlock%2BServer%2BPack-1.4.zip

Unzip to the minecraft-data directory #

Now I can unzip my mods into the minecraft-data directory.

...

If you ever end up on a linux machine that just does not have enough ram to suffice what you are doing and you just need to get the job done you can give it some more swap. You can look up reccomendations for how much swap you should have this is more about just trying to get your job done when you are almost there, but running out of memory on the hardware you have.

You can put this where you wish, for this example I am going to pop it into /swap

sudo fallocate -l 4G /swap sudo chmod 600 /swap sudo mkswap /swap sudo swapon /swap

make sure that your swap is on #

You can make sure that your swap is working by using the free command, I like using the -h flag to get human readable numbers.

❯ free -h total used free shared buff/cache available Mem: 15Gi 5.5Gi 4.9Gi 458Mi 5.2Gi 9.3Gi Swap: 4.0Gi 0B 4.0Gi

yq is a command line utility for parsing and querying yaml, like jq does for json.

I love that all of these modern tools built in go and rust, just give you a zipped up executable right from GitHub releases, but it’s not necessarily straight forward how to install them. yq does one of the best jobs I have seen, giving you instructions on how to get a specific version and install it.

I use a bunch of these tools, and for what its worth I trust the devs behind them to make sure they don’t break. This so far has worked out well for me, but if it ever doesn’t I can always pick an older version.

Since I am all trusting of them I just want the latest version. I do not want to update a shell script with new versions, or even care about what then next version is, I just want it. Luckily you can script the release page for the latest version on all that I have came accross.

...

So worktrees, I always thought they were a big scary things. Turns out they are much simpler than I thought.

no special setup

I thought you had to be all in or worktrees or normal git, but not both. When I see folks go all in on worktrees they start with a bare repo, while its true this is the way you go all in, its not true that this is required.

Making a worktree is as easy as making a branch. It’s actually just a branch that lives in another place in your filesystem.

...

I write many of these posts from a 10 year old desktop that sits in my office these days. It does a very fine job running all of the things I need it to for my side work, but sometimes I want a mobile setup. I don’t really want to spend the $$ on a new laptop just for the few times I want to be somewhere else in the house. What I do have though is a chromebook.

I’ve tried to get the chromebook into my workflow in the past, but have failed. Much because by the time I got all of my tools up and running in the linux vm it was taking up quite a bit of space on the device and made it harder for others to use as a chromebook.

Today I am giving it a second try, but this time with ssh.

Before doing anything I checked to see if sshd is already running. Using the following command.

...

If you have ever ran which <command> and see duplicate entries it’s likely that you have duplicate entries in your $PATH. You can clean this up with a one liner at the end of your bashrc or zshrc.

There is GNU coreutils command called mktemp that is super handy in shell scripts to make temporary landing spots for files so that they never clash with another instance, and will automatically get cleaned up when you restart, or whenever /tmp gets wiped. I’m not sure when that is, but I don’t expect it to be long.

Here are some examples of making temp directories in different places, my favorite is mktemp -dt mytemp-XXXXXX.

# makes a temporary directory in /tmp/ with the defaul template tmp.XXXXXXXXXX mktemp # makes a temporary directory in your current directory mktemp --directory mytemp-XXXXXX # shorter version mktemp -d mytemp-XXXXXX # same thing, but makes a file mktemp mytemp-XXXXXX # makes a temporary directory in your /tmp/ directory (or what ever you have configured as your TMPDIR) mktemp --directory --tmpdir mytemp-XXXXXX # shorter version mktemp -dt mytemp-XXXXXX # same thing, but makes a file mktemp --tmpdir mytemp-XXXXXX # shorter version mktemp -t mytemp-XXXXXX

Use Case #

Here is a sample script that shows how to capture the tempdir as...

...

Once you give a branch the big D (git branch -D mybranch) its gone, its lost from your history. It’s completely removed from your log. There will be no reference to these commits, or will there?

Checkout is your savior, all you need is the commit hash.

your terminal is still open

We have all done this, you give branch the big D only to realize it was the wrong one. Don’t worry, not all is lost, this is the easiest to recover from. When you run the delete command you will see something like this.

...