How to Install and Uninstall gosu Package on Ubuntu 16.04 LTS (Xenial Xerus)

Last updated: May 18,2024

1. Install "gosu" package

This is a short guide on how to install gosu on Ubuntu 16.04 LTS (Xenial Xerus)

$ sudo apt update $ sudo apt install gosu

2. Uninstall "gosu" package

Please follow the step by step instructions below to uninstall gosu on Ubuntu 16.04 LTS (Xenial Xerus):

$ sudo apt remove gosu $ sudo apt autoclean && sudo apt autoremove

3. Information about the gosu package on Ubuntu 16.04 LTS (Xenial Xerus)

Package: gosu
Priority: extra
Section: universe/admin
Installed-Size: 1772
Maintainer: Ubuntu Developers
Original-Maintainer: pkg-go
Architecture: amd64
Version: 1.7-1
Depends: libc6 (>= 2.4)
Filename: pool/universe/g/gosu/gosu_1.7-1_amd64.deb
Size: 443120
MD5sum: 34ff36e5a87ebefbe6e16a0c88469a3b
SHA1: 2fe5e14ecbc153b7f83d6b6bfdf880298ec4ea9c
SHA256: a0d047a0b825168e6e09852e27912628a9be06b91fa2183cd9278637f8eb1551
Description-en: Simple Go-based setuid+setgid+setgroups+exec
This is a simple tool grown out of the simple fact that "su" and "sudo" have
very strange and often annoying TTY and signal-forwarding behavior. They're
also somewhat complex to setup and use (especially in the case of "sudo"),
which allows for a great deal of expressivity, but falls flat if all you need
is "run this specific application as this specific user and get out of the
pipeline".
.
The core of how "gosu" works is stolen directly from how Docker/libcontainer
itself starts an application inside a container (and in fact, is using the
"/etc/passwd" processing code directly from libcontainer's codebase).
.
Once the user/group is processed, we switch to that user, then we "exec" the
specified process and "gosu" itself is no longer resident or involved in the
process lifecycle at all. This avoids all the issues of signal passing and TTY,
and punts them to the process invoking "gosu" and the process being invoked by
"gosu", where they belong.
Description-md5: 72c0b42347139534207936c653f27fc4
Built-Using: golang-defaults (= 2:1.6-1ubuntu3), runc (= 0.0.8+dfsg-2)
Homepage: https://github.com/tianon/gosu
Bugs: https://bugs.launchpad.net/ubuntu/+filebug
Origin: Ubuntu