How to Install and Uninstall gosu Package on Ubuntu 21.10 (Impish Indri)

Last updated: November 22,2024

1. Install "gosu" package

This tutorial shows how to install gosu on Ubuntu 21.10 (Impish Indri)

$ sudo apt update $ sudo apt install gosu

2. Uninstall "gosu" package

This guide let you learn how to uninstall gosu on Ubuntu 21.10 (Impish Indri):

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

3. Information about the gosu package on Ubuntu 21.10 (Impish Indri)

Package: gosu
Architecture: amd64
Version: 1.12-1build1
Built-Using: golang-1.15 (= 1.15.4-1ubuntu1), runc (= 1.0.0~rc10-0ubuntu2)
Priority: extra
Section: universe/admin
Origin: Ubuntu
Maintainer: Ubuntu Developers
Original-Maintainer: pkg-go
Bugs: https://bugs.launchpad.net/ubuntu/+filebug
Installed-Size: 2273
Depends: libc6 (>= 2.32)
Filename: pool/universe/g/gosu/gosu_1.12-1build1_amd64.deb
Size: 744740
MD5sum: d1750e2bbd840aed9dc84064a69043bd
SHA1: fb929518d3fad0ff14a1632fe3402e749f7b1ba3
SHA256: c58c79f8fc352592a62b00fb93e65c21d15a7e44b5fa4ec5c47e1ffc6151a582
SHA512: 3e069d0e71b0aa12f99f73167b86294a1a021fdd3fb2eee842177716c67e1688f8519d831308c029a6152d1f0ef16713e5162a05282b9ecf5817b2bc92388229
Homepage: https://github.com/tianon/gosu
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