General Q&A about Linux and Unix-like operating systems
Filters (None)
Where can I find documentation on double asterisk in glob expansion? It is discussed in the .gitignore section of Pro Git. It works in ls **/* to list all terminal files. It is supported by py...
I have some bookmarked folders in GtkFileChooserDialog. I want to add these to my dotfiles. Where are the bookmarks stored?
How can I run a command later? I'm looking for a CLI way to schedule a command to be run later. I know that I could create a systemd timer, install it, activate it... That is too much work. I want...
I have an image (a photo) and I want to highlight certain parts of this. I want to do this from the CLI. I am planning to store the pixel coordinates of polygon vertices in a file, and when I run ...
Question How do you specify underscores as Vim word boundaries when using vim mode in either bash or zsh? MWE w on this_word should place the cursor on the underscore. A second w should place th...
I can start services with systemctl start. I can see logs with systemctl status or journalctl. But by the time I run the second the process has already started. I'd like to start a service and imme...
After a force shutdown on Ubuntu 22.04, installed on a Lenovo Legion 5, the OS seems to have lost its ability to recognize the built-in touchpad or to connect to the internet. For the backstory......
Guix is a rolling release distro. Another well known rolling release distro is Arch Linux. In Arch, you are expected to frequently do system updates. Partial updates are not supported. In my exper...
For some time pacman used to have a problem where: Occasionally Arch maintainers introduce new GPG keys They start signing packages with the keys Your local pacman doesn't receive these until ...
I like how Guix sounds based on what I've read, and I want to try it. However, my partitioning scheme is a bit complicated. With Guix it appears like my biggest concern is hardware (I will regretta...
Question How do I copy to clipboard from terminal with yy, assuming it's configured to use Vim bindings? I am using zsh with bindkey -v. MWE Enter something on the commandline (without pressi...
In Debian-based distributions, one can update the system with apt upgrade and cleanup unused dependencies with apt autoremove. Period. On Gentoo that is apparently not as straightforward. From G...
For a particular use case, I need to be able to set up a Linux host (specifically Debian) to use a VPN tunnel for routing outgoing connections, but still allow incoming connections outside of that ...
I run Windows games with Wine, and use bwrap to sandbox them. I've noticed that passing --unshare-net to disable the network breaks many, many games (they fail to start with no obvious error messag...
I am unable to create new tablespaces on a fresh Postgres 15.3 installation on Ubuntu 22.04. I tried the following so far: re-install Postgres fully loosen file system permission disabled SELi...
I am using Linux Mint 20.3, with Cinnamon as a window manager. I have a folder named .pytest_cache on my Desktop: $ ls -1A | grep '^\.' .pytest_cache I know that if I open a Nemo window, navi...
I am currently ripping a bunch of DVDs. Some are encrypted, and some are not. My method for ripping a DVD depends on whether or not it is encrypted, so I am looking for a command-line method to det...
Have I have the DPI on my laptop set in .Xresources with Xft.dpi: 192. I am outputting to the external monitor with: xrandr --output HDMI-2 --auto --rotate left --right-of eDP-1 Want I want ...
My keyboard has keys for mute, volume up, volume down. In i3wm, I used to have these bound with: bindsym XF86AudioRaiseVolume exec --no-startup-id pulsemixer --change-volume +10 --max-volume 100 ...
At the moment GPG only offers the following options when generating a new subkey the with the addkey command: gpg> addkey Please select what kind of key you want: (3) DSA (sign only) (...
SSH agent prints some envar commands for sourcing in a shell. However, these are bash-style, and I use fish. Fish barfs at the bash syntax. How can I fix it?
I have my key added to ssh-agent and they show up in ssh-add -l. When I try to actually SSH to a host that requires the key, I still get prompted for a password. I enter it again and again and it s...
How do you securely erase data from a thumb (USB/flash) drive? With traditional (magnetic/spinny) hard drives, it used to be that you could use various tools to simply overwrite with random data, ...
I somehow managed to unknowingly change the default app for opening directories on my laptop. E.g. when I use the option open containing folder in a program like Evince, my editor (vscode) opens u...
When formatting drives with Gnome Disks, there is an option to "Erase". The help text says this takes longer, but "completely" erases data. What exactly does this option do? Is there a CLI equival...
****Since upgrading to Ubuntu 22.04 recently, immediately after a reboot I have WiFi to an internet hotspot as I did prior to upgrading. After suspend then resume, the network is no longer working...
I have a script that does git fetch for a repository. When I run this in my shell it works fine. I want to run it in a systemd user unit. However, I am using an SSH url, and the systemd unit fails...
My system occasionally has an issue that looks like this: I run pacman -Syu Many things get updated Many GUI apps (including all display managers and Xorg) start refusing to run and throw up O...
I was looking into unlocking my login after too many incorrect password attempts. I found this post about it. Doing faillock -user $(whoami) --reset did indeed unlock the login. However, what exac...
What is the simplest shell idiom for stripping leading and trailing whitespace from a file or program output? Ideally I am looking for the equivalent of trim or strip methods in some languages. Th...
I am running X on Arch Linux without a desktop environment, only i3. Sometimes I need to switch between typing in different languages. How do I switch my keyboard layout?
When I enter the login password incorrectly 3 times, my computer locks me out from attempting a login for 10 minutes. How can I increase the number of attempts?
My goal is to use a french AZERTY keyboard layout with Arch linux and Gnome desktop environment but use US English as "OS language". Note that I am also open to a "working" solution on any other d...
When I enter the login password incorrectly 3 times, my computer locks me out from attempting a login for 10 minutes. How can I change the timeout?
$ echo "4c 6f 72 65 6d 20 69 70 73 75 6d 20 64 6f 6c 6f 72 20 73 69 74 20 61 6d 65 74 2c 20 63 6f 6e 73 65 63 74 65 74 75 72 20 61 64 69 70 69 73 63 69 6e 67 20 65 6c 69 74 2c" | xxd -r orem ipsum...
I want to have a local DNS server on my home LAN, say at 192.168.1.123. All of my machines will use 192.168.1.123 as their only DNS server when connected to my home network. By default, my DNS ser...
I got this message: Bad owner or permissions on /Users/rbiaa065/.ssh/config What should the permissions be to make ssh happy?
When I try to start MariaDB server (same problem with MySQL) on a fresh Debian 11 install in a Windows Subsystem Linux (WSL) I got the following error: $ sudo systemctl start mariadb System has n...
I have always found PulseAudio to be difficult to use and overcomplicated. Recently I also discovered that it is written by Lennart Poettering, whom I dislike. I am now very motivated to use someth...
I was told that an IPv6 link-local address — typically starting with fe80:: — is derived from the interface's MAC address. Here are some instruction on how to do the conversion. But the conversion...
I uninstalled PulseAudio and installed PipeWire. It seems like now, every application gets an independent audio configuration. When I go into pavucontrol I see "Spotify" where I configure the volu...
With Debian 12, it seems that mysql-server is not available in the "default" package distribution and thus, cannot be installed with sudo apt install mysql-server or sudo apt-get... (I know that ma...
SIGUSR1 and SIGUSR2 are user-defined signals. Imagine there is a tool designed to do something useful upon receiving one or the other. The problem is the default action for these signals is Term (...
This blog post describes a privilege escalation, exploiting tar's --checkpoint-action option. The privilege escalation is used to solve a TryHackMe challenge. The root user calls tar via cron whi...
Unix is very permissive with filenames, and this can sometimes lead to a bunch of annoying corner cases when printing files. A well known example is when you put a newline in a filename, and it bre...
I built Python 3.11 from source (from GitHub python/cpython branch "3.11"). Here is what I did (after downloading the repo as ZIP) cd Downloads 7z x cpython-3.11.zip cd cpython-3.11 chmod +x c...
If a Debian bug number is referenced in the changelog of an uploaded package, it is automatically closed with a generic message: We believe that the bug you reported is fixed in the latest versi...
I noticed that downloading all the pacman packages for a full system install takes a lot of time, so I want to create a systemd time that will periodically download them for me. That way, most of t...
Whenever I do a big system update, OpenGL stops working until the next reboot. This also prevent OpenGL apps from launching. Example: $ glxgears X Error of failed request: BadValue (integer par...