linux

I can't use the "cat" command

I can't use the "cat" command When I run the "cat file.txt" command, I get the response: cat file.txt zsh: command not found: bat This is on Kali Linux 2024.1 that I just installed on VMware Player, updated, and installed Kitty. Asked By: miguele318 || Source Seems like you have "cat" aliased to "bat" (see …

Total answers: 1

PHP memory_limit is not updating for any user, only for root under Debian 12

PHP memory_limit is not updating for any user, only for root under Debian 12 I have a Debian 12 system, where I use PHP in cli mode. In /etc/php/8.2/cli/php.ini I set the memory limit: memory_limit = 1024M If I query it with root, it shows me the right value. But if I use sudo to …

Total answers: 1

Can systemd networkd be configured for netboot, PXE boot, if yes, how?

Can systemd networkd be configured for netboot, PXE boot, if yes, how? If I understand this "issue" (systemd-networkd DHCP Server ignores SendOptions #15780), SystemD can be configured to handle network booting. However, I am unable to find more information about that functionality. I am currently using a DHCPD server with minimal configuration, why it would …

Total answers: 1

Linux Mint LMDE – Cortex XDR not working correctly

Linux Mint LMDE – Cortex XDR not working correctly I have fresh install of Linux Mint LMDE 6. I’ve installed Cortex XDR (v8.2.1.120305) but only one service is running, other services are stopped: $|>> sudo /opt/traps/bin/cytool runtime query Name PID User Status Command pmd 1056 root Running /opt/traps/bin/pmd clad N/A N/A STOPPED N/A dypd N/A …

Total answers: 1

Lost sudo. Beyond salvation?

Lost sudo. Beyond salvation? I made a mistake and gave a container Homepage access to the docker.sock and briefly after I discovered that sudo is no more. sudo sudo: /etc/sudo.conf is owned by uid 1000, should be 0 sudo: /etc/sudo.conf is owned by uid 1000, should be 0 sudo: /etc/sudoers is owned by uid 1000, …

Total answers: 2

Diagnose bash autocomplete issues

Diagnose bash autocomplete issues I have one binary on my system, fio installed via package manager which doesn’t autocomplete files with tab once you’ve typed fio . I guess this means something must over overridding the autocomplete behavior but I don’t even know how to begin diagnosing it. Asked By: BeeOnRope || Source I would …

Total answers: 1

Who changes `/proc/sys/kernel/random/boot_id` in Linux (SLES)?

Who changes `/proc/sys/kernel/random/boot_id` in Linux (SLES)? Well, I thought it’s just logical that the kernel changes /proc/sys/kernel/random/boot_id during boot, and then keeps that value while running. At least that would make sense to me if the intended use of boot_id is to find out when the machine rebooted. When monitoring the file using monit, I …

Total answers: 2

How to escape symbols inside runuser command?

How to escape symbols inside runuser command? I want to get list of PostgreSQL databases. PostgreSQL works by postgres user, so I need to use runuser. While I’m execute runuser -l postgres -c ‘psql -tc "SELECT datname FROM pg_database WHERE datname <> ALL (‘{template0,template1,postgres}’);"’ I get ERROR: column "template0" does not exist LINE 1: …CT …

Total answers: 1

How to validate self-build GNU toolchain and newlib?

How to validate self-build GNU toolchain and newlib? I am working on an embedded system, where there is ARM SOC and RTOS. I have built GNU toolchain with newlib for this embedded system, and did very basic testing. Now before I can be sure to use the self-build toolchain, I want to test it (and …

Total answers: 1

How to tell Linux it's running on batteries?

How to tell Linux it's running on batteries? Whenever I inspect the current state of my Raspberry via the htop command, it shows the battery information is not available. Is there any way to tell my Linux (Ubunutu 22.0.4 LTS) about the current state of the battery it is running on? Asked By: Brainsucker92 || …

Total answers: 1

Is there any e4crypt kernel side documentation?

Is there any e4crypt kernel side documentation? I’m trying to understand e4crypt and fscrypt, and also how they differ. But it is hard to find documentation on e4crypt other than the command line tool man page and some old tutorials. Is there any documentation on how the kernel side of things work? I’m mainly interested …

Total answers: 1

pipe to a different file descriptor

pipe to a different file descriptor Following up on Using while loop to ssh to multiple servers, i.e., for while IFS= read -r -u9 HOST ; do ssh "$HOST" "uname -a" ; done 9< servers.txt which reads from a different file descriptor (9), How to make it read from a pipe of a different file …

Total answers: 1

Does mtrace() still work in modern distros?

Does mtrace() still work in modern distros? tldr: Does mtrace still work or am I just doing it wrong? I was attempting to use mtrace and have been unable to get it to write data to a file. I followed the instructions in man 3 mtrace: t_mtrace.c: #include <mcheck.h> #include <stdlib.h> #include <stdio.h> int main(int …

Total answers: 1

What is the rationale for the change of syscall calling convention in new Linuxes?

What is the rationale for the change of syscall calling convention in new Linuxes? Quoting from https://www.kernel.org/doc/Documentation/process/adding-syscalls.rst: At least on 64-bit x86, it will be a hard requirement from v4.17 onwards to not call system call functions in the kernel. It uses a different calling convention for system calls where struct pt_regs is decoded on-the-fly …

Total answers: 1

objdump `–adjust-vma` destroys debug info

objdump `–adjust-vma` destroys debug info When using the –adjust-vma option of objdump all the functions get squashed together, as if there is no debug information about where each function starts. I’ll demonstrate with the following simple C file (a.c): void func(void) { } int main() { } Compile it using gcc -g a.c Now without …

Total answers: 1

FUSE filesystems look at saved UID/GID?

FUSE filesystems look at saved UID/GID? While attempting to create a program that reads some configuration before launching programs as a normal user and then as the root user, I noticed this odd behavior. I can’t seem to find mention of it anywhere else. Normal filesystems use the effective UID/GID for access checks, but it …

Total answers: 1

Shebang can reference a script in Linux

Shebang can reference a script in Linux I’ve always heard that the target of a shebang line (e.g. #!/bin/bash) must be a binary executable, not a script. And this is still true for many OSes (e.g. MacOS). But I was surprised to see that this is not true on Linux, where up to 4 levels …

Total answers: 1

Create FAT-formatted disk image that can fit 1G file

Create FAT-formatted disk image that can fit 1G file I’m struggling to create a FAT-formatted a disk image that can store a file of known size. In this case, a 1 GiB file. For example: # Create a file that’s 1 GiB in size. dd if=/dev/zero iflag=count_bytes of=./large-file bs=1M count=1G # Measure file size in …

Total answers: 2

lvextend + use variable in order to lvextend filesystem

lvextend + use variable in order to lvextend filesystem we have different Linux machines and each Linux machine need different partition size in order to extend the root filesystem or var filesystem by script , we can use the following lvextend syntax , with variable as – PARTITION_VAL_SIZE PARTITION_VAL_SIZE=100 lvextend -L"$PARTITION_VAL_SIZE"G /dev/vg-data/lv-var PARTITION_VAL_SIZE=30 lvextend -L"$PARTITION_VAL_SIZE"G …

Total answers: 1