General Q&A about Linux and Unix-like operating systems
Filters (None)
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...
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...
How do you find out the number of files in a directory from the command line?
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 ...
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...
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 |...
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...
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...
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 view font files, like .ttf, in Linux? I'd like to see a sample of the font (quick brown fox...) and metadata about it (like exact name).
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'...
I got this message: Bad owner or permissions on /Users/rbiaa065/.ssh/config What should the permissions be to make ssh happy?
Suppose I want to limit what characters are allowed in filenames. For example, I want file creation to fail if there is a \n in the name. Is there a way to enforce this? If it matters, I prefer a...
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...
I have a directory filled with Flac audio files and I would like to convert them all to Mp3. How do I go about this using FFmpeg? I am using the git FFmpeg and Slackware -current.
I'm using the Gnome System Monitor in Linux Mint. Whenever I attempt to "End" or "Kill" a process, I am given this warning via a modal dialog (emphasis mine): Killing a process may destroy data,...
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?
It is often taught that in Unix/Linux text files should end with newline characters. The reason given (orally) to me by various sources was that "some commands (such as wc) assume or require a newl...
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...
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...
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 ...
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 ...
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...
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 '*...
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...
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...
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 noticed in winetricks that it can install windows dlls to the wine folder. It even gives an option to install almost all of them at once. When should someone install these instead of staying with...
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...
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'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...
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 $...
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,...
Suppose I have a list of files on standard input. These may be the output of find, cat filelist.txt or something else. How can I run a command on each file in turn?
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...
There are many GUI apps on my computer that show up as eg. items in the start menu. When I launch these, what if I want to control how exactly they are launched, such as setting environment variabl...
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...
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 (...
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'd like to debug NetworkManager by stepping through it using GDB. I assume I'll have to compile NetworkManager from source to get debug symbols since file /usr/bin/NetworkManager indicates that th...
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...
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...
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...
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"...
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 ...
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 ...