Stack Exchange Network

Stack Exchange network consists of 175 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange
The results are in! See what nearly 90,000 developers picked as their most loved, dreaded, and desired coding languages and more in the 2019 Developer Survey.

Questions tagged [util-linux]

A suite of essential system utilities for Linux.

1
vote
1answer
26 views

Installing newer version of lsblk to RHEL

I am trying to install newer version of lsblk to Red Hat Enterprise Linux Server 7.6. I have installed util-linux on my system in version util-linux.x86_64-2.23.2-59.el7_6.1 but due to a compatibility ...
1
vote
1answer
189 views

Why does switch_root delete all the files in the initramfs?

WARNING: switch_root removes recursively all files and directories on the current root filesystem. -- man switch_root from util-linux, version 2.32-2.fc28.x86_64 Why?
0
votes
2answers
65 views

prevent bind mount on login if mounted

At login, a bind mount is created. In ~/.pam_mount.conf.xml: <volume options="bind" user="phg" mountpoint="/nix" path="/store/nix" /> This needs to be done only once per boot. Note that I do ...
8
votes
1answer
1k views

Why is lazy MNT_DETACH or `umount -l` unsafe / dangerous?

I've read in a few places that umount -l is unsafe: In an answer by @cas: don't use umount's --lazy option if you care about when the external drive can be safely unplugged A comment by @...
0
votes
1answer
58 views

Submit bug report for util-linux

How / where do I submit a bug report for util-linux? Specifically I want to submit a bug for losetup which exits 0 but doesn't actually remove a device under some cirsumstances with the -d flag.
1
vote
2answers
127 views

Remote discovery of hostname and IP address

In my environment there are about 1000 production servers. Direct root login is disabled on all servers. There is one user "abc" which has sudo access. We login to each computer using "abc" and then ...
0
votes
1answer
246 views

Where is struct blkid_struct_dev defined?

blkid.h typedefs as follows: typedef struct blkid_struct_dev *blkid_dev; That is the only appearance of the token blkid_struct_dev in blkid.h. grep -rl blkid_struct_dev /usr/include returns only /...
2
votes
2answers
781 views

Why does util-linux runuser (su) fork?

Using runuser from util-linux (a different entry point for su, which only operates if starting from root), one sees a process tree that looks something like the following: [root] runuser -u username ...
2
votes
1answer
272 views

How does 'whereis' find files so quickly? [duplicate]

I was recently trying to find a binary file with a certain name. I decided to use the whereis search utility (part of the util-linux package). This managed to find the file in half the time than ...
4
votes
1answer
618 views

Why and when does `lsblk` require `sudo`?

On my up-to-date Arch Linux, lsblk works fine without sudo: $ lsblk -o NAME,FSTYPE NAME FSTYPE sda ├─sda1 ext4 ├─sda2 ext4 ├─sda3 swap ├─sda4 └─sda5 ext4 sr0 $ lsblk --version lsblk ...
2
votes
1answer
384 views

lsblk does not return the entire line for the results [closed]

I am having trouble with the command below: ssh -q -o PubkeyAuthentication=yes -o StrictHostKeyChecking=no -o ConnectTimeout=2 -o BatchMode=yes SERVERNAME "lsblk -il" 2>/dev/nul It returns the ...
4
votes
1answer
16k views

Ubuntu runuser command?

I am creating a bash script that requires to run commands as a specific user. As a result I am using the command: runuser I have tested this script and it works perfectly in Ubuntu Server 14.10. ...
3
votes
1answer
996 views

Set environment inside `nsenter /bin/bash`

I'm entering a namespace with nsenter -m -u -i -n -p -t $PID /bin/bash. However, printenv inside this namespace doesn't have everything I need. I'd like to send these variables in, but I'd like to ...
1
vote
2answers
668 views

Linux why does yum say up-to-date when newer versions available?

I am trying to install an up-to-date version (2.19) of util-linux to get lsblk but yum doesn't find it: [Harry@SN031568820668 ~]$ sudo yum install util-linux Loaded plugins: presto, refresh-...
4
votes
1answer
2k views

Is there a command to switch to into an existing namespace?

I am using multiple UTS namespaces, each of them has some servers constantly running. I can get the namespace IDs via readlink /proc/<pid>/ns/uts, now I would like to change into a given ...
5
votes
2answers
20k views

Trouble getting busybox switch_root to work

I'm working on an embedded ARM Linux system that boots using initramfs. (Here's some background from a couple earlier questions, if you're interested.) So far, thanks in part to help received here, I ...
6
votes
1answer
1k views

How to use the ul command line utility

I wanted to answer Use _roff to underline words with "just use ul, this command is meant specifically for underlining text", however I just can't grasp how to use it. I thought $ echo "hello _kitty_ ...