General Q&A about Linux and Unix-like operating systems
Filters (None)
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...
Hello everyone, I am encountering an issue when running pytest in my virtual environment. Although I have installed the required modules in my virtual environment using pip, I am still getting a M...
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...
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...
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...
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...
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 ...
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 some bookmarked folders in GtkFileChooserDialog. I want to add these to my dotfiles. Where are the bookmarks stored?
From what I can tell, both NixOS and Guix are built around a package manager which, instead of installing package into the "common environment" as is traditional, isolates them to mitigate issues a...
Neomutt (and probably Mutt too, but I didn't try) seems to be hiding header fields from email, such as the Message-ID field, and fields that are added by SMTP servers when they receive the message....
flatpak uninstall --unused currently tells me that there is Nothing unused to uninstall. This seems wrong to me, based on the list of packages I see vs. the "root" packages I explicitly installed p...
Say I have some Bash function my-func, that expects a filename and does some processing on the corresponding file. For demonstration purposes, my-func() { cat "$1"; } If I want to apply that fu...
Sorry it was a typo, _ instead of -, that caused the problem. I want to have a key combination to alter the keymaps. It worked with one for us and one for hu, but now I want to use one key combina...
I'm trying to run a pipeline to update a PDF after every push to the 'main' branch. I want it to be atomic, so it doesn't touch the existing PDF until it has finished, so I need to use sponge(1) (...
What is a modern and practical way to handle scheduling tasks on a Linux desktop? Modern means basic features should not rely on obscure or convoluted commands and standards Practical means you...
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 ...
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?
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...
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?
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...
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())'?...
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...
How does the init process play a role in the booting of Linux?
MWE To reproduce: Add bindkey -v to your ~/.zshrc. Invoke python interpreter: python. Type something into the prompt without hitting ENTER: this = "this" + "that". Press ESC and try any vim ...
Problem I can rotate output, but it does not fill screen. Instead it rotates in place so that the right side of the screen goes off the monitor. xrandr --output HDMI-2 --auto --mode 1920x1080 --...
I'm currently using Fedora 34 and want to install Fedora 35 while keeping around just my home folder. Currently I don't have a separate home partition, but I read online that it's easy to make one ...
Question What is the simplest way to change the cursor to indicate vim mode when using zsh? Notes I want it to show as a vertical line in insert mode and a block in normal mode. This is the cur...
I'm playing with NAT, and have a script now that, at startup of my little Linux machine, creates some DNAT rules, which take one incoming special port, and forward that to another interface with a ...
It takes a long time to build even the source package for a PPA of a huge project, and while the build isn't finished my computer is under heavy load so I can barely navigate a browser. The frustra...
A system daemon needs to create several files under /run/program-name/ (and possibly other subdirs of that). They are the PID file, and at least one Unix socket file (but maybe more). The FHS spe...
I'd like to use the answers in this post while using zsh: compgen -c # will list all the commands you could run. compgen -a # will list all the aliases you could run. compgen -b # will list a...
I am using Linux and Gnome. Using GDK, I would like to programmatically manipulate the Top Bar (i.e., the bar at the top of the screen with "Activities", the time, etc.). Here is a picture of it: ...
My device is Thinkpad E40 with openSUSE Leap 15.4. I've use this device under this OS weeks ago and didn't happen this problem. After normally running, wlan0 device not show in nmcli and my wirele...
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 ...
I am using Manjaro(Arch-based Linux). And, I had installed Avro using the following command by getting help of the documentation yay -S ibus-avro-git Avro is software using that software user w...
I have a few CentOS servers that I want to stay automatically up to date with yum-cron, and I want to get emails when there are problems but I do not want to get so many emails about repos being ou...
I have a GNU/Linux host that I use to aggregate syslog events from a few switches, printers, and generally less versatile hosts on my LAN. I set up rsyslog years ago to listen on UDP:514 and save ...
Hi everyone, First post! I'm trying to be able to print from a client machine over my lan to an older HP Laserjet 1012 connected via USB to a Debian box. It prints fine directly. I've gone thro...
I have ordered (but am still waiting for it to arrive) a USB-connected webcam that is supposed to be V4L2 compatible. Once it arrives, I'm obviously going to want to mount it such that it provides...
Every Gentoo user knows USE flags. Occasionally I stumble upon IUSE flags, for example, man emerge mention them in the description of an option: --newuse, -N ... USE flags may be toggled by yo...
I have installed mysql-server on Ubuntu 20.04 then I tried to sign into mysql-server using sudo mysql -u root but I have got Error: Can't connect to local MySQL server through socket '/var/run/mys...
Do any of the cron implementations allow you to manually trigger cron jobs (stuff in your crontab) right now, in the exact same manner as they would have when triggered on their usual schedule, exc...
My primary drive is partitioned basically like so (only roughly to scale): / /home junk v v v |xx###############...
I saw another post recommend using Fedora if you want cutting edge features. Is Fedora really a "cutting edge" distro? I am not very familiar with Fedora, I know it's a community counterpart to R...
How can I grow a libvirtd VM's LVM-backed virtual disk online, without rebooting the vm. My host has an LVM VG for VMs. Each VM disk is an LV to the host. It's easy to grow the VG by adding a PV...
After installing the InconsolataGo font from the Arch package extra/ttf-inconsolata-go-nerd, I see there is an Inconsolata Nerd Font, Regular and an Inconsolata Nerd Font Mono, Regular. Both are mo...