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 »

Posts by Karl Knechtel‭

46 posts
81%
+7 −0
Q&A Find path to an executable

which only tells you about a path that would be found in PATH. Often, people who think they have this question have a more general question - i.e., what will be used when the named command is reque...

posted 2y ago by Karl Knechtel‭

Answer
80%
+6 −0
Q&A How do package managers track the installed files?

Suppose for example I install a .deb package that has no dependencies, and the corresponding program includes some self-update feature (or the documentation asks users to do something like sudo foo...

3 answers  ·  posted 9mo ago by Karl Knechtel‭  ·  last activity 7mo ago by Michael‭

Question packaging software-installation
80%
+6 −0
Q&A Displaying tricky UTF-8 filenames with sane escape sequences

Suppose, in a UTF-8 locale, I do something like: touch $'\u200d.txt' The resulting file's name starts with a zero-width joiner character, which is apparently considered "printable" but is invis...

0 answers  ·  posted 1y ago by Karl Knechtel‭

Question ls unicode escaping
80%
+6 −0
Q&A What desktop environment am I running?

By memory If you installed Linux yourself, then you were almost certainly informed about this at some point in the process. Generally, you're either expected to choose a separate installer accordi...

posted 2y ago by Karl Knechtel‭  ·  edited 1y ago by Karl Knechtel‭

Answer
77%
+5 −0
Q&A Safe handling and display of untrusted data in the terminal

Suppose I have a binary file with some "readable" content in it that I want to display and inspect in the terminal. It's not a problem if cat produces a mess of strange symbols, but it could be a p...

4 answers  ·  posted 6mo ago by Karl Knechtel‭  ·  last activity 3mo ago by Karl Knechtel‭

Question recommendation security terminal
77%
+5 −0
Q&A Replacing the shebang in a script

In a Bash script and/or at the command line, given that $file is the path to an executable text file with a shebang, and $env is a valid shebang, I want to replace the existing shebang in the file ...

3 answers  ·  posted 7mo ago by Karl Knechtel‭  ·  last activity 7mo ago by jhnc‭

Question bash shell-scripting
77%
+5 −0
Q&A What's the "big picture" of how my operating system is put together?

My understanding is that one of the key advantages of Linux is modularity: the actual Linux kernel is quite small, and then what we call Linux is that plus the "rest of the system" - hence "operati...

1 answer  ·  posted 2y ago by Karl Knechtel‭  ·  last activity 2y ago by matthewsnyder‭

Question configuration linux packages
77%
+5 −0
Q&A What is cat abuse/useless use of cat?

Overview A "useless use" or "abuse" of cat occurs when a Unix pipeline (sequence of commands that feed into each other, using the shell | or "pipe" operator) includes a call to cat that is unneces...

posted 2y ago by Karl Knechtel‭

Answer
77%
+5 −0
Q&A What are the concrete security risks of forcibly terminating a process?

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

2 answers  ·  posted 3y ago by Karl Knechtel‭  ·  last activity 2y ago by Kamil Maciorowski‭

Question security kill
75%
+4 −0
Q&A How do programs like less receive keyboard input as well as from a pipe?

(Inspired by: https://discuss.python.org/t/_/107345) It was brought to my attention that it actually works to do something like: $ spam=$(printf '%1000s') $ spam=${spam// /abcdefg} $ echo $spam...

1 answer  ·  posted 4mo ago by Karl Knechtel‭  ·  last activity 4mo ago by gnoutchd‭

Question less io-streams pipes
75%
+4 −0
Q&A Safe handling and display of untrusted data in the terminal

xxd xxd produces a hex dump of the input fed to it. For each byte of input, this includes two hex digits and a symbol which is either an ASCII representation (if the byte corresponds to a printabl...

posted 6mo ago by Karl Knechtel‭

Answer
75%
+4 −0
Q&A As root, how do I read another user's environment variables?

I have a script that should be run using sudo, with the goal of "promoting" a script from a user-level installation to a system installation. Reproduced here: Existing code #!/bin/bash if [[ $...

1 answer  ·  posted 7mo ago by Karl Knechtel‭  ·  last activity 7mo ago by r~~‭

Question bash root-user environment-variables
75%
+4 −0
Q&A Why is "'python' not found" on Debian/Ubuntu/Mint/etc. ?

This question is motivated by several threads and posts on the Linux Mint forums in which people encounter this sort of problem. On Debian-derived distributions of Linux, it's possible that th...

1 answer  ·  posted 1y ago by Karl Knechtel‭  ·  last activity 1y ago by Karl Knechtel‭

Question python
75%
+4 −0
Q&A How does Linux recognize and process .desktop files?

A Desktop entry (.desktop file) is an executable plain text file, which lacks a shebang. Its contents typically look like: [Desktop Entry] Name=Fancy Example Exec=/usr/bin/example --enable-fancy...

1 answer  ·  posted 1y ago by Karl Knechtel‭  ·  last activity 1y ago by Karl Knechtel‭

Question xdg desktop-environment
75%
+4 −0
Q&A Understanding semicolons in Bash functions

I know I can write a function at a Bash command line like so: $ test() { echo 'test' ; } I also found that I can write the } on a separate line, and omit ;: $ test () { echo 'test' > } ...

1 answer  ·  posted 1y ago by Karl Knechtel‭  ·  last activity 1y ago by bgstack15‭

Question syntax bash-function
71%
+3 −0
Q&A How is the filesystem bootstrapped, given that we start on a different partition?

Typically, one has /boot or /boot/efi on a separate partition, using some simple filesystem like FAT32 that the bootloader can handle. At startup, Linux needs to be able to set up the entire / file...

1 answer  ·  posted 5mo ago by Karl Knechtel‭  ·  last activity 5mo ago by GeraldS‭

Question boot partitioning filesystem initramfs
71%
+3 −0
Q&A Is there anything like an interactive version of aplay or speaker-test?

I'd like to be able to send simple commands on the standard input of a running program that plays simple audio (even a sine wave), and have it alter its output in response (e.g. change pitch or vol...

1 answer  ·  posted 6mo ago by Karl Knechtel‭  ·  last activity 6mo ago by John C‭

Question recommendation audio
71%
+3 −0
Q&A Why is "'python' not found" on Debian/Ubuntu/Mint/etc. ?

What goes wrong Depending on your system's history of installations and upgrades, it may not have a python command set up even though Python is installed. This is basically for historical reasons....

posted 1y ago by Karl Knechtel‭  ·  edited 1y ago by Karl Knechtel‭

Answer
71%
+3 −0
Q&A How can I get "help" with vanilla sh builtins?

I discovered that the -s flag for read is a Bash-ism: $ bash -c 'read -s -n 1' # waits until I press a key $ sh -c 'read -s -n 1' sh: 1: read: Illegal option -s Vanilla sh does offer read: ...

1 answer  ·  posted 1y ago by Karl Knechtel‭  ·  last activity 1y ago by Michael‭

Question shell-scripting man-page sh
71%
+3 −0
Q&A How does Linux recognize and process .desktop files?

Upon further investigation, .desktop files don't actually work by executing them. Attemping to run them in a terminal will fail as expected: ./fancy.desktop: line 1: [Desktop: command not found ....

posted 1y ago by Karl Knechtel‭

Answer
71%
+3 −0
Q&A Check if piped-in process is blocked on input

Suppose I am the author of a shell utility called bar. One common use case is in pipelines like foo | bar, where foo sometimes runs interactively. I want to distinguish situations where interaction...

1 answer  ·  posted 1y ago by Karl Knechtel‭  ·  last activity 1y ago by samo‭

Question unix system-calls io-streams
71%
+3 −0
Q&A Why don't LTS distros consistently use/offer LTS kernels?

I've noticed that the default kernel selection for Ubuntu 22.04, for example, is Linux 5.15.0. Ubuntu 22.04 is a LTS release, which is supposed to have standard support until April 2027, and Linux ...

0 answers  ·  posted 2y ago by Karl Knechtel‭

Question kernel distributions release-cycle
71%
+3 −0
Q&A Clarifying terminology related to mounting

I understand that "mounting" in Linux refers to associating some "device" (usually some storage drive or a partition thereof, but it could be a region of RAM, some memory-mapped hardware, etc.) wit...

0 answers  ·  posted 2y ago by Karl Knechtel‭

Question mount terminology
71%
+3 −0
Q&A Why/how can distro support lifetimes exceed the lifetime of their dependencies (such as Python)?

Motivating example: my Mint 20.3 distribution offers long-term support until April 2025, which matches the "standard support" offered for the upstream Ubuntu (20.04 "Jammy Jellyfish"). However, the...

2 answers  ·  posted 2y ago by Karl Knechtel‭  ·  last activity 2y ago by matthewsnyder‭

Question distributions release-cycle
71%
+3 −0
Meta Suggestion: Basic Linux skills compendium

I've been persistently advocating for an analogous effort in the Software community, and generally think that any Codidact community could likely benefit from doing something similar. As a practica...

posted 3y ago by Karl Knechtel‭

Answer