Saturday, April 20, 2024
 Popular · Latest · Hot · Upcoming
19
rated 0 times [  19] [ 0]  / answers: 1 / hits: 11766  / 2 Years ago, sun, february 27, 2022, 5:04:21

I frequently using nsenter command for my purposes in my main system under Arch Linux. Now I have to work on Ubuntu to test my apps on it, but there isn't nsenter in util-linux. Maybe it's a separate package?



UPD. Ok, I checked that version of util-linux in Ubuntu is still much older than 2.23. How can I install new version of package without any after problems on Ubuntu?


More From » 14.04

 Answers
1

Update:



As of 14.10, the util-linux provides the nsenter command. The solution below has been tested with 14.04.






The Debian/Ubuntu version is as you said quite old now, even in Trusty.



There's an opened bug and so far no progress unfortunately.



You could try to build it from source:



wget https://www.kernel.org/pub/linux/utils/util-linux/v2.24/util-linux-2.24.1.tar.gz -qO - | tar -xz -C ~/Downloads


Make sure to install the following build dependencies:



sudo apt-get install libncurses5-dev libslang2-dev gettext zlib1g-dev libselinux1-dev debhelper lsb-release pkg-config po-debconf autoconf automake autopoint libtool


And just run in the source directory (~/Downloads/util-linux-2.24.1):



./autogen.sh

./configure && make





IMPORTANT



Do NOT sudo make install this package on Ubuntu 14.04 LTS until it is officially ready for use, as it definitely demands an unavailable version of libmount, breaking your boot. (If you do this, reinstall the mount package before rebooting your machine, if you can.)



Credits: Trevor Alexander for his comment.






Finally you'll get:



sylvain@sylvain-ThinkPad-T430s:~/Downloads/util-linux-2.24.1$ ./nsenter -V
nsenter from util-linux 2.24.1


Note: as nsenter is not available in the ubuntu util-linux version, you can install just this file in /usr/bin (or sbin):



sudo cp ./nsenter /usr/bin

[#26347] Monday, February 28, 2022, 2 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
cheeturage

Total Points: 432
Total Questions: 111
Total Answers: 115

Location: Bahrain
Member since Tue, Mar 1, 2022
2 Years ago
cheeturage questions
Sat, Dec 4, 21, 02:22, 2 Years ago
Mon, Jan 2, 23, 22:39, 1 Year ago
Sun, Sep 12, 21, 03:21, 3 Years ago
;