Mounting a Disk Image

Mounting a Disk Image I’m trying to create a disk image and mount the partition for further work, but I’m encountering a frustrating error message: "wrong fs type, bad option, bad superblock." Here’s the steps I took and the output I received: $ dd if=/dev/zero of=test.img status=progress bs=200M count=1 1+0 records in 1+0 records out …

Total answers: 2

How to start a minimal Wayland session from command line?

How to start a minimal Wayland session from command line? A way to debug X is that I start an X server (X -ac :0), then an xterm (DISPLAY=:0 xterm) and a WM on it (DISPLAY=:0 icewm). It is unthinkably useful is there is a display problem. What can I do with wayland? I absolutely …

Total answers: 1

SIGPIPE and bash pipefail

SIGPIPE and bash pipefail I am trying to better understand SIGPIPE on linux. I ran this experiment: { ls -al /tmp/ ; echo "$?" 1>&2 ; } | head and it echos 141 which I understand is an exit code that is given to processes that exit with SIGPIPE Previously, I have done this a …

Total answers: 1

Booted to a tty1 screen in Ubuntu KDE after autoremoving ca-certificates

Booted to a tty1 screen in Ubuntu KDE after autoremoving ca-certificates I was having a problem when updating Ubuntu. Certificate verification failed, so I searched on the internet. Then by my own logic and some answers on some forum. I ran the following command: sudo apt autoremove ca-certificates Now after restarting my PC I am …

Total answers: 1

Is it possible to sort the letters in a word in a line of text?

Is it possible to sort the letters in a word in a line of text? So I have a file full of test commands that I like to run against some of my functions to make sure they are handling all possible situations correctly. No point in having duplicate commands tho. Here’s some examples: rap …

Total answers: 5

ssh fails only when multiple arguments are stored in a string

ssh fails only when multiple arguments are stored in a string I am writing a bash script on Raspberry Pi OS (based on Debian 12 Bookworm). The script tries to do something like ssh "$args" "$user"@"$ip" ‘command’ From what I have read this is a standard practice. However I have found that when $args contains …

Total answers: 1

How to reliably maintain watches on edited files with inotify?

How to reliably maintain watches on edited files with inotify? I’d like to monitor a file with inotify, and trigger some code when someone changes the content (IN_MODIFY or IN_CLOSE_WRITE), but I’m running into problems where inotify stops returning events when users edit the file with their favorite tool. The file is meant to be …

Total answers: 2

What are the file size options for "find . -size" command?

What are the file size options for "find . -size" command? I found out that to look for file size in bytes, I use ‘c’. So I can look for file size with 1000 bytes by using: find . -size 1000c But what about different kind of size such as Mb, Gb or even bits? …

Total answers: 3

How to config SSH authentication with all 3 components: publickey, password and OTP

How to config SSH authentication with all 3 components: publickey, password and OTP Update 1: I’m able to apply all publickey + password + OTP with this basic config in /etc/pam.d/common-auth. auth [success=ok] pam_unix.so auth [success=1] pam_google_authenticator.so nullok echo_verification_code [authtok_prompt=Enter your OTP:] auth requisite pam_deny.so auth required pam_permit.so I will try to apply pam_faillock.so to …

Total answers: 1

Is there a way to use tee with the whole script from INSIDE the script?

Is there a way to use tee with the whole script from INSIDE the script? I’m making a script to update the system (Ubuntu 22.04), updating all packages in apt, flatpak and snap with one order (like sudo ./update.sh) and, in case something goes wrong, I want to save the output in a file. I …

Total answers: 2

What is the scope of /var/log/user.log file?

What is the scope of /var/log/user.log file? /var/log/user.log What’s the scope of this log file? Is it related only to currently logged in user or to multiple users and which ones? What this log file is about and when should I look into it? Asked By: metablaster || Source The syslog module provides system logging …

Total answers: 1

coreutils man pages are missing in wsl fedora

coreutils man pages are missing in wsl fedora i installed fedora 39 on wsl but i ran into some issues when i tried using man when i used the man command i was getting no manual entry for … i had to remove tsflags=nodocs from /etc/dnf/dnf.conf i reinstalled man man-db man-pages and changed the MANPATH …

Total answers: 1

What does "6" mean in glibc.so.6?

What does "6" mean in glibc.so.6? When exploring the C++ binary, I find that libstdc++.so.6 is dyn-linked into libm.so.6 and libc.so.6: $ ldd /lib/x86_64-linux-gnu/libstdc++.so.6 linux-vdso.so.1 (0x00007ffcb737b000) libm.so.6 => /lib/x86_64-linux-gnu/libm.so.6 (0x00007fd3b2295000) libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007fd3b1c00000) /lib64/ld-linux-x86-64.so.2 (0x00007fd3b2396000) libgcc_s.so.1 => /lib/x86_64-linux-gnu/libgcc_s.so.1 (0x00007fd3b2275000) My questions are: What does 6 mean in the name? I originally thought it was …

Total answers: 2

Package maintainer pre-inst script `install` vs `upgrade`

Package maintainer pre-inst script `install` vs `upgrade` According to the Debian package maintainer script documentation, the pre-install script can be called with either the install or the upgrade first argument: The preinst script may be called in the following ways: new-preinst install new-preinst install old-version new-version new-preinst upgrade old-version new-version What is the difference between …

Total answers: 2

How to install an older version of GCC for armhf?

How to install an older version of GCC for armhf? I’m not really an expert of linux, so i’m feeling a bit lost. I’m running an Ubuntu 22.04.3 LTS image in WSL, as i need to cross-compile a program for an ARM linux pc using a Windows PC. That image was automagically installed by the …

Total answers: 1

How to get display to show a pdf properly

How to get display to show a pdf properly When I do: display file.pdf it shows this: I can’t resize the little window that it adds but I can remove it by clicking on the x. I can also remove the checkerboard effect that comes from assuming transparency, I think, with: display -alpha opaque file.pdf …

Total answers: 1

Reducing microphone noise using pipewire modules

Reducing microphone noise using pipewire modules With pulseaudio, it was easy to load a module for microphone noise reduction. This link explains it clearly: https://askubuntu.com/questions/18958/realtime-noise-removal-with-pulseaudio I want to add rnnoise as a plugin of pipewire to cancel the noise of the microphone for all users. I’m looking for a minimalist solution and would like to …

Total answers: 2

22.04.4 Server – No Choice to Keep Existing Installs?

22.04.4 Server – No Choice to Keep Existing Installs? I have other partitions (data and OS) that must be kept intact on the only drive I can use on this PC. (Why I can’t change things: This is for a ‘home server’; not a company machine with lots of drives available.) Documentation from Ubuntu suggests …

Total answers: 1

Snapped windows getting resized in XFCE

Snapped windows getting resized in XFCE I’m running Xubuntu 22.04 LTS with xfce 4.16. Kernel is 5.15.0-101-generic (not sure this is relevant). I can snap windows from within XFCE to either side of the screen using super + right arrow, super + left arrow etc. They initially look good like this but, after some use, …

Total answers: 1