Posts tagged: linux
All posts with the tag "linux"
I’m playing with omarchy on an old laptop and decided I want to share it with my kids without sharing what I also set up as my sudo password.
Lsblk -f
Look for the one labeled crypto_LUKS
Sudo cryptsetup luksChangeKey /dev/nvme0n1p2
Then you will be asked for your sudo password, previous full disk encryption password, then the new one twice.
Now my laptop can be shared without sharing my private sudo password.
First Find your usb disk. You should be able to identify it by size and name using lsblk.
lsblk -o NAME,SIZE,MODEL,TRAN,RM,MOUNTPOINTS
Here I see my good ol Trans-It Drive. It’s not fancy, it wasnt even at the time it was new, but I have it and it works. next we run the disk destroyer dd to copy raw bytes right on to the drive.
Warning
This is a full reformat of the drive, nothing on the drive will be recoverable afterwards. I keep this drive around as a boot disk and it just changes distro occasionally.
sudo dd if=~/Downloads/omarchy-4.0.1.iso of=/dev/sdb bs=4M status=progress conv=fsync
Note
Don’t forget the bs, the default block size is so slow it will take an eternity to copy a linux iso on to a boot drive.
Installing omarchy #
I wanted to give omarchy quatro a try, here is the session to get it.
~ NO PYTHON VENV SET USING SYSTEM NVIM
❯ lsblk -o NAME,SIZE,MODEL,TRAN,RM,MOUNTPOINTS
NAME SIZE MODEL TRAN RM MOUNTPOINTS
sda 119.2G SAMSUNG MZNLN128HAHQ-000H1 sata 0
├─sda1 1G 0
└─sda2 118.2G 0
sdb 7.6G Trans-It Drive usb 1
├─sdb1 5.8G 1
└─sdb2 23M 1
zram0 93.9G 0 [SWAP]
nvme0n1 931.5G Samsung SSD 980 1TB nvme 0
├─nvme0n1p1 1G nvme 0 /boot
└─nvme0n1p2 930.5G nvme 0 /var/log
/var/cache/pacman/pkg
/home
/
~ NO PYTHON VENV SET USING SYSTEM NVIM
❯ sudo dd if=~/Downloads/omarchy-4.0.1.iso of=/dev/sdb bs=4M status=progress conv=fsync
I don’t run into windows file endings very often, so when I see little ^M’s
all over your file, I think “shit I know what these are and cant remember”
They represent the windows carriage return.
Linux vs Unix Line Endings #
The difference here is that Unix uses \n and Linux uses \r\n, going all the
way back to the typewriter it represents the two keys that a typist would have
to press to get a new line and return the carriage back to the beginning.
Vim/Neovim #
When I open up a file and see this garbage all over, its not cozy, I want them gone, I dont want them all over my editor. I’m not sure what this would look like on windows, I haven’t been able to afford a windows machine in years, but its gross on my machine.
Remove them with a substitution command from normal mode.
:%s/\r//g
removing carriage returns with a substitution command
I’ve been running fedora coreos on my home servers for awhile. I really liked
the stability I got from bazzite, and have since enjoyed the stability of
fedora coreos. Since it’s an immutable system I’ve never quite known if I need
to reboot or not, and was unsure how to check for updates. Today I learned you
can use rpm-ostree status to see if your
fedora coreos system is up to date.
rpm-ostree status
For me it listed security advisories with a count of each severity unknown, low, moderate, and important.
This morning I had a machine crash on me and came back to an error.
Error
zsh: corrupt history file /home/u_walkews/.zsh_history
Dammit I don’t want to redo my shell history, I checked with a clanker and they
came up with this solution using strings that only prints printable
characters.
cp ~/.zsh_history ~/.zsh_history.bak
mv ~/.zsh_history ~/.zsh_history.corrupt
touch ~/.zsh_history
chmod 600 ~/.zsh_history
strings ~/.zsh_history.corrupt > ~/.zsh_history
chmod 600 ~/.zsh_history
Malicious Aur Packages Jun 2026
gpus are awesome and I need one for Bambu Studio to be usable in a
distrobox. Adding the --nvidia flag to distrobox create bind mounts the
nvidia /dev/ devices and sets up the necessary environment variables. Once
we are in there are a couple of packages to install to make it work.
distrobox create --name bambu-studio --image archlinux:latest --nvidia
distrobox enter bambu-studio
sudo pacman -S nvidia-utils lib32-nvidia-utils vulkan-icd-loader
nvidia-smi
glxinfo | gprep OpenGL
sudo pacman -Syu --needed base-devel git
git clone https://aur.archlinux.org/paru-bin.git
cd paru-bin
makepkg -si
paru -S bambustudio-bin
bambu-studio
distrobox-export --app bambu-studio
Today I learned how to use tar over ssh to save hours in file transfers. I keep all of my projects in ~/git (very creative I know, I’ve done it for years and haven’t changed). I just swapped out my main desktop from bazzite to hyprland, and wanted to get all of my projects back. Before killing my bazzite install I moved everything over (16GB of many small files), it took over 14 hours, maybe longer. I had started in the morning and just let it churn.
This was not going to happen for re-seeding all of my projects on my new system, I knew there had to be a better way, I looked at rsync, but for seeding I ran into this tar over ssh technique and it only took me 6m51s to pull all of my projects off of my remote server.
ssh [email protected] 'tar -C /tank/git -cpf - .' \
| tar -C "$HOME/git" -xpf -
Today I needed to make a backup of some config. I wanted to add a timestamp so that I knew when the backup was made. This would make unique backups easy, and I could tell when they were made.
cp configfile configfile.backup.$(date %s)
If you want to decrypt the timestamp into something more human readable. You can list backup files, strip out the timestamp, and then convert it to a human readable date.
/bin/ls | grep backup | sed 's/configfile.backup.//' | xargs -I {} date -d @{}
or just throw it to the date command by hand.
date -d @1755895402
I’ve got a few samba shares going in my homelab, and I’m struggling finding a great app to scroll through vacation photos with my wife. I want something intuitive, non intimidating, and just works. Turns out that the default file browser application for hyprland works great, but you need to enable previews for remote storage for it to work for my use case here.