General Q&A about Linux and Unix-like operating systems
I have a handful of shell scripts that accept any number of command line arguments, then do some relatively expensive processing based on each command line argument in turn. The general format for ...
So I ran into that weird "packages being held back" problem while updating my system using apt. After some research, it appears to be the result of "phased updates". What are phased updates, any...
I run an environment that, until recently, did all local name resolution by putting names in /etc/hosts. I'm in the process of replacing that with local DNS. The DNS part works fine, and now I'm tr...
Question What partition type should I use for FAT partitions such that Linux and Windows systems both recognize the drive? Notes I am partitioning the drive with fdisk and making the filesystem ...
I have a shell script with a syntax compatible to both bash and zsh, except for a section that has zsh specific syntax that throws syntax errors if sourced from bash. Is there an easy way to escap...
Since the Pause key is useless, I tried to map it to a modifier key. What is straightforward for other keys turned out not to work fine for Pause. By inspecting the output of xev -event keyboard |...
Assuming I have a running Linux system that has the /proc/config.gz file: Does the (unpacked) file always contain all of the options the particular kernel supports, including commented out like: ...
For several days now, I've been getting a notification telling me that there's a pending update to the "snap-store", and to close the app to avoid disruption. I first got this notification while...
A project I want to work on requires Ruby. I was directed to RVM or rbenv. I tried rbenv first because it has Mac instructions, ran into failures, uninstalled it and installed RVM, and still ran ...
On a Linux system, a lot of files are installed from packages, many of which have different licenses (and sometimes different licenses for different files in the package). If I want to figure out ...
Using BASH, how can I redirect stdout and stderr each, to two separate files, simultaneously? That's a mouthful, let me clarify a little: I have a hypothetical script that may/will generate outpu...
GNU Screen and Tmux allow you to run command-line programs on a server, and 'disconnect' from them but let them keep running remotely. This is great if your primary computer is a laptop and it has...
I'm still trying to solve my problem with installing Ruby on a new Mac, and some discussions are saying that I need to reinstall brew because of the change from the old chipset to the M1. (I'm jus...
Less does not display data files normally, but if it were some sort of Xxd. $ bash --norc $ export LESS= $ file -i /var/log/lastlog /var/log/lastlog: application/octet-stream; charset=binary $...
How do you find out the number of files in a directory from the command line?
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 have a setup with two Raspberry PIs, a CM3 module with only a USB connection to the outside, and the Pi4 with a lot of connectors. I set up things such that CM3 functions as USB Gadget, and once...
How can I convert PDF to docx using the terminal or a Linux app? The output docx must be formatted with editable text. Some alternative solutions I've seen online using soffice and abiword output...
I've got a Raspberry Pi running Raspbian, which I'd like to reinstall from scratch. However over time I've made many changes to the configuration (installed new packages, changed the name of the de...
I have an old Mac Mini (Late 2009 model) kicking around, and as Apple stopped providing patches for it (and as I'm not going to put an unpatched system on the Internet), I was looking for a Linux d...
On a Debian Buster system I use, the password for connecting to a VPN is stored in the GNOME Keyring. Therefore, whenever I want to connect to the VPN in question, I get prompted to unlock my keyri...
I want to remove all files with the ".part" extension in the current directory and its subdirectories, including files with the same name but different extension. Is this correct? find . -name '*...
Why is libvkd3d1 not upgrading on my system? (lubuntu 20.04 LTS) When I run sudo apt update, apt flags libvkd3d1 and libvkd3d1:i386 as upgradable, but sudo apt upgrade does nothing and reports tha...
I'd like to hide/dismiss/remove all the notifications that applications like Signal have created. I know I can create notifications with, for example, notify-send -t 10000 "🤖 Here goes my message"...
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...
I had a nightly cronjob start throwing errors about "inappropriate permissions..." rsync: [generator] failed to set permissions on "/data2/home/redacted/alsoredacted/opt/dell/srvadmin/var/log/open...
An article in the GTK blog explains the situation very well, but here is my go at it. In my keyboard layout, accents are handled as dead keys, so to insert "ë", first I type ¨ and then e. Nothing ...
I plan to set up a Raspberry Pi to host some dockerized apps, for it to be accessible to the Internet through a remote proxy, and since I'm no sysadmin, I'm trying to come up with a suitable policy...
When exploring the commands from this answer to my previous question, I found that the ist of packages includes a lot that were automatically installed due to dependencies. Obviously I'm interested...
POSIX defines Text file as A file that contains characters organized into zero or more lines. The lines do not contain NUL characters and none can exceed {LINE_MAX} bytes in length, inclu...
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...
I have a RaspberyPi module, with USB connected to another module computer (as USB host) running Linux. The RasPi is configured as USB ethernet gadget. Once I boot the RasPi, and enter dmesg on th...
How do I get the URL of the remote repository that pacman uses to download packages? I know that I can tell pacman which server to use by editing /etc/pacman.d/mirrorlist. But in my case, all of t...
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...
Hi, I'm new here. So basically I builded Python 3.11 (https://python.org/) from source (from GitHub python/cpython branch "3.11"). So, here what I did : (obviously first I downloaded the repo as...
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...
Problem I want to set a global keyboard rate for both the X session and the console that persists for external keyboards, across plug-ins and removals. To my understanding, Xorg and console sett...
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.
Trying to understand what exactly <!nocheck> does next to a package in build-depends (for example, Perl). Debian Wiki says: Terms can be negated by using an exclamation mark as a prefix ...
In my Ruby project, when I try bundle install, I got: Your Ruby version is 2.7.0, but your Gemfile specified 2.6.6 I don't know how to solve it. I am using Windows Subsystem for Linux (WSL) U...
I am running Debian stretch on a Lenovo laptop with only a window manager (i.e. no desktop). Out of the box, this configuration of Debian ignores the keys with special Fn functions, such as volum...
I just want to "zoom in/out" in the text console, is there a straightforward command to do that? I have found various sources (1, 2, 3) that either suggest permanent changes (e.g. modifying config...
I executed emerge --deselect xournalpp , which means "I don't need the xournalpp package anymore", so it can be removed by a future --depclean action in case Portage figures xournalpp is not a ...
How can I manually set default audio device? I connected docking station and Lubuntu is somehow convinced that it can play audio. I want to continue using laptop speakers. Detaching docking stati...
If I want to yank my last command I can UP yy, but this does not copy to the system clipboard. How do I configure my terminal to copy to the system clipboard so I can paste into other programs? ...
While this is about grub loader, this is likely to be a question of OS related. If it doesn't belong to this site than I will remove it. I had installed Bliss in sda2. Device Boot Start...
I don't know what these things are called exactly in the Linux world. But there is the concept of a drive in RAM, to write files onto and read them like it was any disk drive. There is also the c...
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 have used printers before in Arch Linux, but I can't figure out how to print with a Canon PIXMA TR4522 printer. More specifically, I am having trouble finding the correct driver. I have installe...
I got 2 small computers running Linux. One acts as ethernet gadget, connected via USB to the other, the host. I set up a bridge, like so: ip link add name br0 type bridge ip link set dev br0 up...