Communities

Writing
Writing
Codidact Meta
Codidact Meta
The Great Outdoors
The Great Outdoors
Photography & Video
Photography & Video
Scientific Speculation
Scientific Speculation
Cooking
Cooking
Electrical Engineering
Electrical Engineering
Judaism
Judaism
Languages & Linguistics
Languages & Linguistics
Software Development
Software Development
Mathematics
Mathematics
Christianity
Christianity
Code Golf
Code Golf
Music
Music
Physics
Physics
Linux Systems
Linux Systems
Power Users
Power Users
Tabletop RPGs
Tabletop RPGs
Community Proposals
Community Proposals
tag:snake search within a tag
answers:0 unanswered questions
user:xxxx search by author id
score:0.5 posts with 0.5+ score
"snake oil" exact phrase
votes:4 posts with 4+ votes
created:<1w created < 1 week ago
post_type:xxxx type of post
Search help
Notifications
Mark all as read See all your notifications »
Q&A

General Q&A about Linux and Unix-like operating systems

Filters (None)
75%
+4 −0
How to run a command on a list of files?

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?

4 answers  ·  posted 10mo ago by matthewsnyder‭  ·  last activity 2d ago by trueframe‭

71%
+3 −0
What is cat abuse/useless use of cat?

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?

3 answers  ·  posted 5d ago by matthewsnyder‭  ·  last activity 3d ago by Karl Knechtel‭

cli
71%
+3 −0
How do you remap mouse buttons?

How can I remap buttons on my mouse, especially for more exotic ones like MMO mice?

3 answers  ·  posted 2mo ago by matthewsnyder‭  ·  last activity 3d ago by Michael‭

60%
+1 −0
Group and users seem to disagree about whether the users are in the group

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 ...

0 answers  ·  posted 4d ago by Karl Knechtel‭

66%
+2 −0
How do you generate arbitrary random numbers from /dev/random?

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())'?...

1 answer  ·  posted 4d ago by matthewsnyder‭  ·  last activity 4d ago by r~~‭

71%
+3 −0
What are non-POSIX shells and what's the point of them?

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...

1 answer  ·  posted 4d ago by matthewsnyder‭  ·  last activity 4d ago by matthewsnyder‭

60%
+1 −0
How do you generate random strings from /dev/random?

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...

1 answer  ·  posted 5d ago by matthewsnyder‭  ·  last activity 4d ago by matthewsnyder‭

47%
+9 −10
Which Linux system to use?

Usually, many new users are confused when it comes to deciding which Linux to use. After trying out some distros, they don't know which one to use next. Which Linux is for beginners, intermediates ...

6 answers  ·  posted 2y ago by deleted user  ·  last activity 6d ago by matthewsnyder‭

60%
+1 −0
Can you put systemd units under a custom path?

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...

1 answer  ·  posted 3mo ago by matthewsnyder‭  ·  edited 6d ago by matthewsnyder‭

60%
+1 −0
Prettify XML in a shell

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...

1 answer  ·  posted 8d ago by Iizuki‭  ·  edited 8d ago by Iizuki‭

71%
+3 −0
How to invert command exit code?

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 ...

1 answer  ·  posted 5mo ago by Iizuki‭  ·  last activity 9d ago by Iizuki‭

60%
+1 −0
Is there a way to automatically normalize paths when extracting RARs?

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...

1 answer  ·  posted 11d ago by matthewsnyder‭  ·  last activity 10d ago by Karl Knechtel‭

66%
+2 −0
Solr crashes on startup with segmentation fault

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...

1 answer  ·  posted 20d ago by tarhalda‭  ·  last activity 14d ago by tarhalda‭

50%
+0 −0
How to add a new drive to a BTRFS filesystem?

BTRFS is capable of spanning over multiple drives. How to add one more to an existing filesystem?

1 answer  ·  posted 16d ago by Iizuki‭  ·  last activity 16d ago by Iizuki‭

75%
+4 −0
How to extract string from file, run filter, and replace in file with new value?

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...

4 answers  ·  posted 4mo ago by David‭  ·  last activity 17d ago by Mithical‭

71%
+3 −0
NetworkManager can't open certificate file when trying to connect to VPN

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...

0 answers  ·  posted 21d ago by adonias‭  ·  edited 18d ago by Quasímodo‭

66%
+2 −0
What are the %U and %u parameters in desktop files?

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?

1 answer  ·  posted 21d ago by Iizuki‭  ·  last activity 21d ago by Iizuki‭

71%
+3 −0
How do I diagnose TLS errors?

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...

1 answer  ·  posted 24d ago by matthewsnyder‭  ·  last activity 22d ago by Michael‭

62%
+3 −1
init process play a role in the booting of Linux

How does the init process play a role in the booting of Linux?

1 answer  ·  posted 2mo ago by trueframe‭  ·  last activity 29d ago by Mithical‭

71%
+3 −0
How to find your public IP address from command-line?

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...

3 answers  ·  posted 3mo ago by Iizuki‭  ·  last activity 30d ago by Michael‭

66%
+2 −0
How to debug audio issues with JACK on Linux

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...

0 answers  ·  posted 1mo ago by mr Tsjolder‭  ·  edited 1mo ago by mr Tsjolder‭

75%
+4 −0
What's the point of faillock?

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...

0 answers  ·  posted 1mo ago by matthewsnyder‭

50%
+0 −0
ldapsearch: how to ignore certificate?

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.

1 answer  ·  posted 1mo ago by Iizuki‭  ·  edited 1mo ago by Iizuki‭

66%
+2 −0
Find out which process is using a port

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?

1 answer  ·  posted 1mo ago by Iizuki‭  ·  last activity 1mo ago by Canina‭

66%
+2 −0
What is synchronization in Wine?

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?

1 answer  ·  posted 2mo ago by matthewsnyder‭  ·  last activity 1mo ago by matthewsnyder‭

60%
+1 −0
An alternative to pacman sudo nag?

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...

2 answers  ·  posted 2mo ago by matthewsnyder‭  ·  last activity 1mo ago by TowerOfTurtles‭

44%
+2 −3
Why does Linux use the sudo command?

Why does Linux use the sudo command?

1 answer  ·  posted 2mo ago by catexotica‭  ·  last activity 1mo ago by matthewsnyder‭

60%
+1 −0
How to use the gitignore file without git(1).

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 ...

1 answer  ·  posted 1mo ago by alx‭  ·  last activity 1mo ago by r~~‭

71%
+3 −0
How to count the lines of a file?

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

2 answers  ·  posted 1mo ago by Iizuki‭  ·  last activity 1mo ago by Michael‭

80%
+6 −0
How to forward SSH access of one machine, through another, to the rest of a network?

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...

3 answers  ·  posted 2y ago by CanisSomnolentus‭  ·  last activity 1mo ago by Michael‭

50%
+0 −0
What is Kmail running in the background?

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...

0 answers  ·  posted 2mo ago by matthewsnyder‭

66%
+2 −0
Can rsync handle moves and renames?

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...

1 answer  ·  posted 2mo ago by Karl Knechtel‭  ·  edited 2mo ago by Karl Knechtel‭

71%
+3 −0
Can I make a compressed RAM drive and externally prepare a (pre-)compressed file to copy onto it?

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...

1 answer  ·  posted 2y ago by CanisSomnolentus‭  ·  edited 2mo ago by matthewsnyder‭

60%
+1 −0
How to find product and vendor names for xorg.conf

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 ...

0 answers  ·  posted 2mo ago by mcp‭  ·  edited 2mo ago by mcp‭

50%
+0 −0
How to find user's id (UID)?

How to lookup user-id with the user's name? E.g. What's the UID of user linus?

1 answer  ·  posted 3mo ago by Iizuki‭  ·  last activity 3mo ago by Iizuki‭

uid
66%
+2 −0
Show a timestamp on the right side of prompt when executing a command in ZSH

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 ...

1 answer  ·  posted 3mo ago by Iizuki‭  ·  last activity 3mo ago by Iizuki‭

zsh
77%
+5 −0
How do I safely replace brew on Big Sur?

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...

4 answers  ·  posted 2y ago by Monica Cellio‭  ·  last activity 3mo ago by matthewsnyder‭

50%
+0 −0
How to check spam headers of EML file from command line?

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...

0 answers  ·  posted 3mo ago by matthewsnyder‭

50%
+0 −0
Albert with compositor surrounded by ghost of other windows

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...

0 answers  ·  posted 3mo ago by matthewsnyder‭

80%
+6 −0
How to RTFM well to get a CLI command

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'...

2 answers  ·  posted 5mo ago by LAFK‭  ·  last activity 3mo ago by matthewsnyder‭

80%
+6 −0
Looking for a way to sync dotfile content between different machines without introducing security issues

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 ...

3 answers  ·  posted 5mo ago by paulsweatte‭  ·  last activity 3mo ago by matthewsnyder‭

60%
+1 −0
Is it safe to completely take over ~/.config/systemd/user?

~/.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...

0 answers  ·  posted 3mo ago by matthewsnyder‭

50%
+0 −0
Can I confine an executable inside a Docker container using a host apparmor profile?

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...

0 answers  ·  posted 3mo ago by much‭

75%
+4 −0
Debug NetworkManager with GDB

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...

1 answer  ·  posted 9mo ago by Matthias Braun‭  ·  last activity 4mo ago by Matthias Braun‭

66%
+2 −0
Modern and practical way to schedule tasks on a Linux machine that is not always on

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...

3 answers  ·  posted 4mo ago by matthewsnyder‭  ·  edited 4mo ago by matthewsnyder‭

60%
+1 −0
In i3wm, how do I move a workspace with its windows to another screen?

In i3, is there a way to move an entire workspace to another monitor, including all windows it contains?

0 answers  ·  posted 4mo ago by matthewsnyder‭

60%
+1 −0
In i3wm, how to create affinity between screens and workspaces?

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...

0 answers  ·  posted 4mo ago by matthewsnyder‭

60%
+1 −0
In i3wm when moving windows, how do I also switch to the workspace if it's active?

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...

0 answers  ·  posted 4mo ago by matthewsnyder‭

60%
+1 −0
In i3wm, how do I tell which screen is which workspace?

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...

0 answers  ·  posted 4mo ago by matthewsnyder‭

66%
+2 −0
Run pipeline in the background from git hook

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) (...

1 answer  ·  posted 4mo ago by alx‭  ·  last activity 4mo ago by alx‭