Search
How to configure ZSH shell to print a timestamp on the right hand side of the prompt line when executing a command? I don't want to display the time prior to executing a command. Here's about how ...
The preexec function is called right before executing commands, so it's the place to do this sorta things. This solution is adapted from Dan Berindei's original answer (CC BY-SA 3.0) to a related ...
Suppose I have a directory structure like ├── src │ ├── folder_a │ │ ├── file_w │ │ └── file_x │ ├── folder_b │ │ ├── file_y │ │ └── file_z and I back it up using rsyn...
Wine has options for "Synchronization", like "Esync" or "Fsync". What do these actually do? What is the purpose of such an option? What is the impact to normal usage of a Windows program in Wine?
TL;DR When pacman bugs you for sudo, in bash or zsh (and possibly others but I haven't verified that), run sudo !! Full Answer As I see it you have 2 options: command substitution or an alias (o...
Sometimes your programs fail because the network port they are trying to use is already in use by some other process. How to find out what this other process is?
I am trying to debug an issue with audio playback in MuseScore. During this process, I realised that I had/have no clue about audio playback in Linux (or in general for that matter). I already le...
Over some period of time, I have used a couple tools for local TLS scans and diagnostics. One of them may include pointers for whatever situation you have. Tool Description From Current? ...
Desktop files always have either %u or %U as an argument for the program being launched. E.g. here's a line from my firefox.desktop: Exec=/usr/lib/firefox/firefox %u What does it mean?
They are defined in the Desktop Entry Specification. In fact there are also %f and %F options. They tell the desktop manager how the program handles multiple files. Like if I select a bunch of fil...
I am trying to run Solr 9.5.0 on Windows Subsystem For Linux 2. It crashes with a Segmentation Fault and does not start. I can run it on Windows without an issue. Java version on WSL2: 17 Java ve...
If all else fails, you could create a wrapper shell function to check the output of unrar l (probably by piping to wc -l) and proceed accordingly.
Wayland, ideally If you are on Wayland, the blessed way is to use the configuration for your desktop environment (DE) to map mouse keys and other input devices, except for a couple well-known opti...
Suppose I want to get random numbers from /dev/random with basic CLI tools. Is there a way to do it, that's easier to type and read than python -c 'import random; print(100 + 200*random.random())'?...
From the average user's perspective: Back in the day when people were figuring out how to do shells, there were as many shell syntaxes as shells. Everyone made up their own little language to go w...
When I create the initramfs, I sometimes see messages like: ==> WARNING: Possibly missing firmware for module: 'xhci_pci' I get many for different modules. What do they mean? Should I in...
When PSF says Python 3.8 is not supported, they are simply saying they will no longer bother fixing bugs in or adding stuff to that version. It's not like Python 3.8 will start automatically explod...
GPG stores keys inside an internal database of some sort. How to export your public key in the familiar -----BEGIN PGP PUBLIC KEY BLOCK----- format so that it can be imported to other software? E.g...
This is how to save it to a file: $ gpg --export --armor key-id > my-key.pub --armor stands for the format with printable characters.
With yq: $ yq --output-format yaml . file.json > file.yaml . is a filter which is applied to the data, but since . just stands for the document root, this means that the data is passed throu...
What security risks can be introduced this way, and how? Consider the following scenario: A legitimate server listens on some network port. Usually¹ no other process can listen on the por...
I have a systemd unit that does some stuff on the internet. Sometimes this gets fired at startup. I want to make sure it's delayed until the computer is connected to the internet. In my notes I fo...
Can I restrict myself from certain actions when I SSH in from outside a certain IP range? For instance no sudo? Maybe with ~/.ssh/authorized_keys having a from="!1.2.3.4/26" option with some kind ...
Surely there exists a command to print out the system's mother board model? Opening up the chassis is not an option.
Try reading the files in /sys/class/dmi/id/, some of them don't require root privileges. For example: board_name board_vendor