General Q&A about Linux and Unix-like operating systems
Filters (None)
On my current setup (running Linux Mint 20.3 Cinnamon), I have an administrative user and several ordinary users. I intend for all of these users to be in the same group, which happens to have the ...
I've been learning some Linux and I finally feel like I can find my way around the command line. But now I hear people say there are other, "non-POSIX" kinds of shell, with different semantics. Wha...
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())'?...
Sometimes I share Unix commands online, and people chastise me for "useless use of cat" (UUOC) or "cat abuse". My cat is quite comfy and doing very well, thank you. What are they talking about?
Of course every language has some kind of random library... But can you generate custom random strings with just basic CLI tools? For example, we have /dev/random which provides a stream of random...
How to pretty print XML in a shell? I have command-line tool which outputs XML in a single line, totally unreadable. I would like something to pipe this into, to turn it into human readable XML wi...
I use unrar to extract rar archives sometimes: UNRAR 6.24 freeware Copyright (c) 1993-2023 Alexander Roshal Sometimes the archive root has several files, so if I do unrar x foo.rar it will...
BTRFS is capable of spanning over multiple drives. How to add one more to an existing filesystem?
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...
I want to connect to my university network via OpenVPN under Fedora GNOME. I imported the openvpn configuration provided by the university in the Network Manager GUI and specified the user certifi...
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?
For reasons of my own, I have services on my LAN which use HTTPS and I create my own certificates for these. Over the years, the usage of TLS has evolved considerably. Many features that were once...
On a default Arch install, faillock makes it so that if you enter the sudo password wrong too many times, even the correct password will be rejected until the timer is up. At the same time, you ca...
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...
How to ignore server certificate when using ldapsearch command-line tool? Of course this isn't something you should be doing regularly, but it would be a handy asset for troubleshooting.
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?
How can a file list be manually filtered with a gitignore file. I want to do the equivalent of git ls-files, but it should work even if I remove .git, so I can't use git(1). Currently, I'm doing ...
How to get the number of lines in a file? I.e. for a file like this: Line one Line 2 Final line I would like to do something like this: $ count-lines /path/to/the/file/above 3
How does the init process play a role in the booting of Linux?
When I run Kmail on i3, and then close it, it appears to continue running some stuff in the background. For example, I periodically get notifications about new mail from dunst, even though I have c...
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?
How can I remap buttons on my mouse, especially for more exotic ones like MMO mice?
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...
Some pacman functions require sudo. When I forget the sudo, you get: error: you cannot perform this operation unless you are root. I then have to press the keys: up, home, s, u, d, o, space, en...
Problem How do I find product and vendor names for use with a xorg.conf file? Neither the xorg.conf nor the xinput manuals specify how to do this. xinput lists info, but the output lacks column ...
How to lookup user-id with the user's name? E.g. What's the UID of user linus?
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 ...
If I have an email in EML format, how can I determine its spam status from the terminal? My mail provider appears to insert a X-Acme-Spam-Status header. It looks like X-Acme-Spam-Status: v=1; e=b...
ip a command will conveniently show the addresses assigned to your network interfaces, but oftentimes this is not what the internet sees your machine as. So how to find your public IP address from...
On Arch Linux, I installed albert (from AUR) and picom as the compositor. I am using i3 as the window manager. When I bring up the albert window, it is surrounded by the ghost of a window in the b...
~/.config/systemd/user intended purely for units created and managed by the user manually, or are there any automated processes that expect to control it? For example, do packages or programs ever...
The systemd manual gives a list of path where systemd looks for unit files. However, I want to isolate my units in a path of my own choosing. Is it possible to configure systemd to add some path t...
I'm trying to containerize an application that currently uses apparmor to confine Python. This allows sandboxing of user-submitted code. How can I get docker and apparmor to play well together? Cu...
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...
In i3, is there a way to move an entire workspace to another monitor, including all windows it contains?
I have multiple screens and I often connect and disconnect monitors while the system is running. i3 assigns a workspace to each monitor, but does so unpredictably. Sometimes my main monitor is work...
Let's say I have workspaces 1, 2, 3 on screen A and 4, 5 on screen B. Currently workspaces 1 and 4 are active. With my current config, moving a window to another workspace never activates it. How...
I have multiple screens and I often connect and disconnect monitors while the system is running. i3 assigns a workspace to each monitor, but does so unpredictably. Both workspaces are highlighted a...
TASK I am coding up ebooks to a specific standard, and have a script that converts a string into the correct titlecase for this publisher. When working with some public domain source files, one of...
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) (...
When hardening my system with Lynis I had information about /etc/issue and /etc/issue.net being found weak. Lynis redirects me to Enterprise, which is a paid product and a bit overkill for my home...
I've been met with the phrase RTFM often. I recognize its value. However, the manual pages are often hard to understand and written by people who know so much about the topic at hand that they don'...
My VISUAL setup interferes with my cron jobs. crontab -l works all right, I see my previous jobs. crontab -e, crontab -e -u user-here - opens GVIM on an empty file checked cron.allow or .deny,...
I switch between three computers and have never been able to keep my dotfiles in sync. I cannot put them into source control because they contain sensitive data. So, my question is: how do I share ...
How can I rescale the Linux virtual terminals (ctrl + alt + {f1, f2, f3, f4, f5, f6}), so that a high-resolution display doesn't make the letters too small? I'd like to use 1080 or even 720 resolu...
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...
Using For the console: /etc/vconsole.conf ---- KEYMAP=dvorak For X Session: .xinitrc ---- setxkbmap -layout us -variant dvorak & Problem For the console, it applies the dvorak lay...
How to apply a logical not to a shell command, e.g. in a Bash script? So if the command exited with 0 (success) I would like it to be changed to a non-zero value, and if it exited with a non-zero ...
What switches do I need to add to see my video RAM (VRAM) with inxi? inxi -G shows my video card model and other info, but not video RAM.