Skip to main content

New answers tagged

1 vote

"Permission denied" error while trying to create and run a systemd service

Failed to locate executable /home/vagrant/helloworld.sh: Permission denied Sounds like vagrant does not have execute (search) permission on /home or /home/vagrant. Both seems strange for ordinary ...
Hauke Laging's user avatar
  • 94.5k
0 votes

Find laptop internal keyboard Controller model/vendor/Product #

One can only look for a "Parent" device/chip. See Marcus Müller's answer. Method 1) On Ryzen this command is likely to output "parent" chip/device for the emulated keyboard ...
strider's user avatar
  • 91
2 votes

Configuring Procmail with CRM114

Procmail is normally installed to process mail as it is delivered to local inboxes by your Mail Transfer Agent (MTA, i.e. like Sendmail or Postfix), not by your mail utility (Mail User Agent, like ...
telcoM's user avatar
  • 114k
4 votes

rsync with --include-from breaks hardlinks (evec with -H)

OK, the problem was simple. --includes-from= is waiting for regexp from files to import. My file didn't have regexp but file names, sometimes with spaces or other special character, making them ...
François-Xavier Payet's user avatar
2 votes

Bluetooth speaker/headphones stop playing when Bluetooth keyboard is connected

This adapter seems to have issues with BlueZ, PipeWire/WirePlumber, and simultaneous HID + A2DP connections. Try to see if you can fix it with a firmware or driver update. If not, I’d recommend ...
ReflectYourCharacter's user avatar
3 votes

Find laptop internal keyboard Controller model/vendor/Product #

Is internal keyboard controller sitting on pci or usb bus? No, as the anachronistic labeling as "i8042" (intel i8042, the keyboard controller of the IBM PC-AT, from 41 years ago) says, this ...
Marcus Müller's user avatar
1 vote

Tool to display DDR5 RAM SPD timings/MT profiles

To access the SPD timings, you'll first need the i2c bus driver for your chipset. For AMD Ryzen chipsets, it is (perhaps surprisingly) i2c-piix4. Once that is loaded, the ee1004 module for DDR4 or ...
telcoM's user avatar
  • 114k
0 votes

Is there any clean way to create samba share for multiple homes?

You were so close! For future readers - since the question was asked several years ago - the key to this is to use %U in the service name rather than %s. %U - the user name the client requested %s - ...
Chris Davies's user avatar
1 vote

Hide Docker Volumes

You should add executable permissions for your rules file. And reload udev rules sudo chmod +x /etc/udev/rules.d/00-docker.rules sudo udevadm control --reload
eryepa's user avatar
  • 11
0 votes

ZFS refusing to import healthy pool

You are using the wrong import method. zpool import command with -d dir option is used for searching pools made a of file provisioned devices. When you run it on the /dev/disk/by-id directory, this ...
inspeeredo's user avatar
1 vote

What is the best way to detect busy CPU cores for blk-mq request steering in Linux kernel?

Disclaimer: I am not familiar with this kind of problem. It seems that the number of I/O requests per CPU core is not the only influence on I/O perfomance. Having more on the same core may be ...
Hauke Laging's user avatar
  • 94.5k
0 votes

Need to retrieve XML value properly

Using sed to parse xml is a very bad design. Really. Don't do it. Even in shell, there's some good xml parsers out there, using xpath querys. $ cat file.xml <root> <Name> bar </Name>...
Gilles Quénot's user avatar
2 votes

Can I combine raid1 and dup BTRFS profiles?

I am not aware of a way to do that directly (i.e. with btrfs means only) but you could use LVM to split the devices in two parts, 95:5. Then add all four devices to the filesystem, set data to RAID1 ...
Hauke Laging's user avatar
  • 94.5k
5 votes
Accepted

NVMe: Unable to change power state from D3cold to D0, device inaccessible

I found a solution. By removing the device from the PCIe tree and then rescanning the bus, it comes back up: root@rtrbox:~# lsblk NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINTS loop0 ...
forest's user avatar
  • 3,175
2 votes

this monitor resolution not supported

I assume this happens in all Linux's ? I mean, it's been two decades since I connected a screen via VGA (and 1920×1200 is definitely pretty much above what you want to transport in analog), but ...
Marcus Müller's user avatar
2 votes

How to forget running but canceled transactions in a btrfs recovery?

To forget a running transaction in btrfs you need to need to zero the log. To do so: sudo btrfs rescue zero-log path/to/partition From man pages: zero-log: Clear the filesystem log tree. This command ...
tukan's user avatar
  • 6,665
1 vote

Configure Linux to regularly sync cached data to disk

Albeit rare but there ARE scenarios where a sync MAY NOT occur when you expect it. For example right after using sftp. man sftp has a -f switch to force a sync. https://man.openbsd.org/sftp https://...
LMSingh's user avatar
  • 185
0 votes

Finding files that use the most disk space

I would go with a two-step process: Use du with --max-depth=1 to find directories where those large files could be located. For example, directories exceeding 10G: sudo du --human-readable --max-...
smac89's user avatar
  • 1,665
0 votes

Execute bash commands one at a time

You'll find that "stepping through my script, inspecting the system after every line": That's the classical job of a debugger! How to debug a bash script? has quite a few options (and I've ...
Marcus Müller's user avatar
3 votes
Accepted

Execute bash commands one at a time

Well, you could always manually read the commands from a file, and run them after getting confirmation. If you want to support the full shell syntax and e.g. pipelines, you'll need to use eval. ...
ilkkachu's user avatar
  • 148k
0 votes

ssh/scp works but rsync just constantly says "no"

Install both ssh and rsync for cygwin. Cygwin's rsync doesn't work well with the ssh under Windows path.
user174016's user avatar
0 votes

Using Citrix Receiver behind an HTTP proxy

According to Citrix documentation: https://docs.citrix.com/en-us/citrix-workspace-app-for-linux/secure#https-protocol-support-for-proxy-server Previously, you could connect to a proxy server only ...
Typewar's user avatar
  • 197
0 votes

ARM cross-compiler not recognized in MX Linux during STM32 development

/usr/bin/ is where most binaries are kept in Linux and/or /bin/. If you want to add, like @glemco stated, it to your $PATH, one can like so: In the file ~/.bashrc, type at the end of the file this ...
For Ward's user avatar
0 votes

Execute bash commands one at a time

Usually, when you have a list of commands, the main idea is to create a shell script where you can check more deeply error handling. But just for fun, this is what I would do: file: uptime pwd whoami ...
Gilles Quénot's user avatar
1 vote

Why does "seq 1000000 | tee /dev/stdout" produce more single-digit numbers than expected?

As Stéphane Chazelas explained, tee is the wrong tool for the job of duplicating line-based input into a single output stream. It interleaves data at block boundaries that can be within a line. If ...
Peter Cordes's user avatar
  • 6,690
2 votes

How can I find common prefixes in file names to group them?

Using Raku (formerly known as Perl_6) Raku regex below groups filenames by starting characters: minimum 3-or-more <alpha> characters followed by \h horizontal whitespace or _ underscore: ~$ ...
jubilatious1's user avatar
  • 3,903
0 votes

Where does Firefox store its cookies on Linux?

If you want to know what path firefox is using for your current profile you can check this with about:profiles or about:support in the url bar. No matter how Firefox is installed, via a package ...
ReflectYourCharacter's user avatar
3 votes

Are there any options for the nmcli command that outputs the SSID of a wifi including, if present, trailing spaces?

I have to manage the output of the command nmcli by a Python script. No you don't. Python can directly access NetworkManager's API in several ways. For example, you can call libnm through pygobject: ...
grawity's user avatar
  • 15.1k
0 votes

How to check ulimit usage

slightly different version of agc script: #!/bin/sh printf "open files: %3i%%\n" $(($(lsof -n -u $USER | tail -n +2 | wc -l)00/$(grep "Max open files" /proc/self/limits | tr -...
Luigi's user avatar
  • 1
4 votes
Accepted

Are there any options for the nmcli command that outputs the SSID of a wifi including, if present, trailing spaces?

By this post I have found the option --get-value of the command nmcli. For an explanation of the option see the documentation of the command nmcli. By this option I can specify what fields must be ...
User051209's user avatar
23 votes

Why does "seq 1000000 | tee /dev/stdout" produce more single-digit numbers than expected?

Having both of tee's outputs going to the same pipe creates tearing within lines because they don't start/end at the boundaries of read/write blocks. tee, reads its input and writes its output by ...
Stéphane Chazelas's user avatar
3 votes

Are there any options for the nmcli command that outputs the SSID of a wifi including, if present, trailing spaces?

Have you tried the -m multiline option? It lists all fields as name and value, and I would hope that trailing blanks should be preserved. I'm not sure about leading blanks in field values, as it's not ...
Hans-Martin Mosner's user avatar
0 votes

Turn off --skip-grant-tables in MySQL

I have an update in solution. If what has been suggested above doesn't fix your problem, then this might be it. I took some time reading the logs, and figured the problem is the encryption algorithm ...
Meromah's user avatar
0 votes

How can I find common prefixes in file names to group them?

In pure bash, a function with either pattern globbing like: myfind () { ( shopt -s nullglob; printf '%s\n' "$1"* ) } or RegEx matching like: myfind () { ( shopt -s nullglob; ...
Raffa's user avatar
  • 509
9 votes

How can I find common prefixes in file names to group them?

With perl: $ find . -print0 | perl -C -l -0ne ' if (m{/([^/]{4,}?\w)\b[^/]*\z}) { push @{$list{$1}}, $_; } END { while (($part, $list) = each(%list)) { if (($count = @$list) > 1)...
Stéphane Chazelas's user avatar
3 votes

How can I find common prefixes in file names to group them?

If you only accept the string to end at a word border then this gives you the potential common strings; tune that to your requirements: sed -n '/^\(\w\+ \w\+\) /s/^\(\w\+ \w\+\) .*$/\1/p' file Then ...
Hauke Laging's user avatar
  • 94.5k
0 votes

usbfs did not claim interface before use

A program using an USB device should use USBDEVFS_CLAIMINTERFACE to make sure it gets exclusive access to the interface. It works without, but the kernel issues a warning that another program or a ...
Simon Richter's user avatar
3 votes

How to trigger an action when a kernel driver produces an error

With rsyslogd you can match the error message and run a program. Create a file such as /etc/rsyslog.d/99-myamdgpu.conf with the contents: module(load="omprog") if $msg contains 'the error ...
meuh's user avatar
  • 54.7k
2 votes
Accepted

How to trigger an action when a kernel driver produces an error

I created a quick hack for my specific issue using the following script: #!/bin/bash while true; do journalctl -S "$(date '+%Y-%m-%d %T')" -kf -o cat -g amdgpu | grep -m 1 '\[drm\] \*...
td211's user avatar
  • 831
2 votes

Disable wakeup on plugging in USB-C power

It seems that writing a 1 to /sys/module/acpi/parameters/ec_no_wakeup fixes the issue, which makes me think that maybe the kernel parameter I tried, acpi.ec_no_wake=1 is a typo I found in some ...
Cactus's user avatar
  • 885
0 votes

How to find out which interface am I using for connecting to the internet?

Another elegant one-liner without multiple commands and dependencies like route on modern distros: nmcli -t -f DEVICE c show --active | head -n 1 It'll show eth0 on a normal Wired Connection Edit: ...
Jonny Soe's user avatar
  • 101
8 votes
Accepted

Which Linux distributions bind TTYs to Control + Alt + F13 to F24 keys?

In Linux, if the kernel supports VTs, they are allocated as necessary, up to the maximum number of supported VTs (MAX_NR_CONSOLES, which is 63). In most systems there is always at least one allocated ...
Stephen Kitt's user avatar
2 votes

CONFIG_NAMESPACES, CONFIG_USER_NS, and user.max_*_namespaces

If a kernel is built with CONFIG_NAMESPACES disabled, then no namespace support is available with that kernel, at all. That can’t then be changed at runtime. The same applies to CONFIG_USER_NS: if a ...
Stephen Kitt's user avatar
1 vote

is there a list of every scancode that linux uses

If you’re only looking for evdev codes, those are all defined in include/uapi/linux/input-event-codes.h in the kernel source code. If you have the appropriate packages installed, the codes known on ...
Stephen Kitt's user avatar
0 votes

How to parallelize dd?

I wrote a bash script to make dd parallelization more simple https://github.com/Snorch/linux-helpers/blob/master/pdd #!/bin/bash # This script is intended to parallelize dd into NRCPU threads # Note: ...
Snorch's user avatar
  • 31
16 votes

Does a Linux console change color when it crashes?

I confidently chose "B. Black", since I thought the administrator switched to a virtual terminal with Ctrl+Alt+F3 to switch to CLI mode and check logs. Since terminals are black, I thought ...
grawity's user avatar
  • 15.1k
24 votes
Accepted

Does a Linux console change color when it crashes?

To me, a server displaying a purple screen is a crashed ESX host. I’m not aware of any Linux-based system showing a purple screen when crashed. ESX used to include a Linux kernel for its first (...
Stephen Kitt's user avatar
3 votes
Accepted

manage route redirects received from the default gateway

Redirects and PMTUD results are stored in the route cache: ip route show cache ip route flush cache
grawity's user avatar
  • 15.1k
0 votes

System goes to suspend mode when it is not supposed to

window managers Check the power management and energy settings of your desktop environment. For example, GNOME defaults to suspend after 15 minutes of inactivity. systemd Check the file /etc/systemd/...
sebix's user avatar
  • 484
0 votes

System goes to suspend mode when it is not supposed to

I did not find the reason but I did find a work-around: During the time periods when I do not want the systemd to go to suspend mode I keep this command running in a dedicated shell: systemd-inhibit --...
Hauke Laging's user avatar
  • 94.5k

Top 50 recent answers are included