banner コマンド 2020

 

banner コマンドは 1990 年より前に開発されたコマンドで、今は Cedar Solutions という会社がソースコード保有しているようです。

こんな風に指定した文字列を大きな文字にしてくれるコマンドです。サーバー作業手順書で見かけたことのある人がいるかもしれません。

最近のディストリビューションでも利用できるのか調べてみました。

 
# banner tech ##### ###### #### # # # # # # # # # ##### # ###### # # # # # # # # # # # # ###### #### # #

 CentOS / RHEL

RHEL 8 の yum リポジトリには残ってませんでした。

$ docker container run --rm -it registry.access.redhat.com/ubi8/ubi:latest [root@690b60b58764 /]# cat /etc/os-release NAME="Red Hat Enterprise Linux" VERSION="8.2 (Ootpa)" ID="rhel" ID_LIKE="fedora" VERSION_ID="8.2" PLATFORM_ID="platform:el8" PRETTY_NAME="Red Hat Enterprise Linux 8.2 (Ootpa)" ANSI_COLOR="0;31" CPE_NAME="cpe:/o:redhat:enterprise_linux:8.2:GA" HOME_URL="https://www.redhat.com/" BUG_REPORT_URL="https://bugzilla.redhat.com/" REDHAT_BUGZILLA_PRODUCT="Red Hat Enterprise Linux 8" REDHAT_BUGZILLA_PRODUCT_VERSION=8.2 REDHAT_SUPPORT_PRODUCT="Red Hat Enterprise Linux" REDHAT_SUPPORT_PRODUCT_VERSION="8.2" [root@690b60b58764 /]# yum install -q -y epel-release Error: Unable to find a match: epel-release [root@690b60b58764 /]# yum install -q -y banner Error: Unable to find a match: banner

CentOS 8 の yum リポジトリ にも残ってません。

$ docker container run --rm -it centos:8 [root@7267ea99d5f6 /]# cat /etc/os-release NAME="CentOS Linux" VERSION="8 (Core)" ID="centos" ID_LIKE="rhel fedora" VERSION_ID="8" PLATFORM_ID="platform:el8" PRETTY_NAME="CentOS Linux 8 (Core)" ANSI_COLOR="0;31" CPE_NAME="cpe:/o:centos:centos:8" HOME_URL="https://www.centos.org/" BUG_REPORT_URL="https://bugs.centos.org/" CENTOS_MANTISBT_PROJECT="CentOS-8" CENTOS_MANTISBT_PROJECT_VERSION="8" REDHAT_SUPPORT_PRODUCT="centos" REDHAT_SUPPORT_PRODUCT_VERSION="8" [root@7267ea99d5f6 /]# yum install -q -y epel-release Failed to set locale, defaulting to C.UTF-8 warning: /var/cache/dnf/extras-cbfb2f07b0021b7e/packages/epel-release-8-8.el8.noarch.rpm: Header V3 RSA/SHA256 Signature, key ID 8483c65d: NOKEY Importing GPG key 0x8483C65D: Userid : "CentOS (CentOS Official Signing Key) <security@centos.org>" Fingerprint: 99DB 70FA E1D7 CE22 7FB6 4882 05B5 55B3 8483 C65D From : /etc/pki/rpm-gpg/RPM-GPG-KEY-centosofficial [root@7267ea99d5f6 /]# yum install -q -y banner Failed to set locale, defaulting to C.UTF-8 Error: Unable to find a match: banner
 
 かろうじて CentOS 7 用のリポジトリには残っていました。

$ docker container run --rm -it centos:7 [root@a9ea0e617cbd /]# cat /etc/os-release NAME="CentOS Linux" VERSION="7 (Core)" ID="centos" ID_LIKE="rhel fedora" VERSION_ID="7" PRETTY_NAME="CentOS Linux 7 (Core)" ANSI_COLOR="0;31" CPE_NAME="cpe:/o:centos:centos:7" HOME_URL="https://www.centos.org/" BUG_REPORT_URL="https://bugs.centos.org/" CENTOS_MANTISBT_PROJECT="CentOS-7" CENTOS_MANTISBT_PROJECT_VERSION="7" REDHAT_SUPPORT_PRODUCT="centos" REDHAT_SUPPORT_PRODUCT_VERSION="7" [root@a9ea0e617cbd /]# yum install -q -y epel-release warning: /var/cache/yum/x86_64/7/extras/packages/epel-release-7-11.noarch.rpm: Header V3 RSA/SHA256 Signature, key ID f4a80eb5: NOKEY Public key for epel-release-7-11.noarch.rpm is not installed Importing GPG key 0xF4A80EB5: Userid : "CentOS-7 Key (CentOS 7 Official Signing Key) <security@centos.org>" Fingerprint: 6341 ab27 53d7 8a78 a7c2 7bb1 24c6 a8a7 f4a8 0eb5 Package : centos-release-7-8.2003.0.el7.centos.x86_64 (@CentOS) From : /etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-7 [root@a9ea0e617cbd /]# yum install -q -y banner warning: /var/cache/yum/x86_64/7/epel/packages/banner-1.3.4-3.el7.x86_64.rpm: Header V3 RSA/SHA256 Signature, key ID 352c64e5: NOKEY Public key for banner-1.3.4-3.el7.x86_64.rpm is not installed Importing GPG key 0x352C64E5: Userid : "Fedora EPEL (7) <epel@fedoraproject.org>" Fingerprint: 91e9 7d7c 4a5e 96f1 7f3e 888f 6a2f aea2 352c 64e5 Package : epel-release-7-11.noarch (@extras) From : /etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL-7 [root@a9ea0e617cbd /]# banner CentOS 7 ##### ####### # # ####### ####### ##### # # # ## # # # # # # # # # # # # # # # # ##### # # # # # # ##### # # # # # # # # # # # # # ## # # # # # ##### ####### # # # ####### ##### ##### # # # # # #

 Debian / Ubuntu

Debian 10 では main ラインに残っていますSystem-V banner clone という名称になっていますけど。

 

$ docker container run --rm -it debian:10 root@3f80cbca76a0:/# cat /etc/os-release PRETTY_NAME="Debian GNU/Linux 10 (buster)" NAME="Debian GNU/Linux" VERSION_ID="10" VERSION="10 (buster)" VERSION_CODENAME=buster ID=debian HOME_URL="https://www.debian.org/" SUPPORT_URL="https://www.debian.org/support" BUG_REPORT_URL="https://bugs.debian.org/" root@3f80cbca76a0:/# apt update -qq -y All packages are up to date. root@3f80cbca76a0:/# apt install -qq -y sysvbanner The following NEW packages will be installed: sysvbanner 0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded. Need to get 6982 B of archives. After this operation, 32.8 kB of additional disk space will be used. debconf: delaying package configuration, since apt-utils is not installed Selecting previously unselected package sysvbanner. (Reading database ... 6677 files and directories currently installed.) Preparing to unpack .../sysvbanner_1%3a1.0-16_amd64.deb ... Unpacking sysvbanner (1:1.0-16) ... Setting up sysvbanner (1:1.0-16) ... root@3f80cbca76a0:/# banner Debian 10 ###### # # ###### ##### # ## # # # # # # # # # # ## # # # ##### ##### # # # # # # # # # # # # ###### # # # # # # # # # # # # ## ###### ###### ##### # # # # # # ### ## # # # # # # # # # # # # # # # # # # ##### ###
 
Ubuntu 20 でも同じ感じでした。
$ docker container run --rm -it ubuntu:20.10 root@84880acdaf84:/# cat /etc/os-release NAME="Ubuntu" VERSION="20.10 (Groovy Gorilla)" ID=ubuntu ID_LIKE=debian PRETTY_NAME="Ubuntu Groovy Gorilla (development branch)" VERSION_ID="20.10" HOME_URL="https://www.ubuntu.com/" SUPPORT_URL="https://help.ubuntu.com/" BUG_REPORT_URL="https://bugs.launchpad.net/ubuntu/" PRIVACY_POLICY_URL="https://www.ubuntu.com/legal/terms-and-policies/privacy-policy" VERSION_CODENAME=groovy UBUNTU_CODENAME=groovy root@84880acdaf84:/# apt update -qq -y 27 packages can be upgraded. Run 'apt list --upgradable' to see them. root@84880acdaf84:/# apt install -qq -y sysvbanner The following NEW packages will be installed: sysvbanner 0 upgraded, 1 newly installed, 0 to remove and 27 not upgraded. Need to get 7112 B of archives. After this operation, 36.9 kB of additional disk space will be used. debconf: delaying package configuration, since apt-utils is not installed Selecting previously unselected package sysvbanner. (Reading database ... 4218 files and directories currently installed.) Preparing to unpack .../sysvbanner_1%3a1.0-17fakesync1_amd64.deb ... Unpacking sysvbanner (1:1.0-17fakesync1) ... Setting up sysvbanner (1:1.0-17fakesync1) ... root@84880acdaf84:/# banner Ubuntu 20.10 # # # # ##### # # # # ##### # # # # # # # # ## # # # # # # ##### # # # # # # # # # # # # # # # # # # # # # # # # # # # ## # # # ##### ##### #### # # # #### ##### ### # ### # # # # ## # # # # # # # # # # # ##### # # # # # # # # # # # ### # # # # # # # ### # # # ####### ### ### ##### ###

Alpine

Alpine 3.9 の apk リポジトリには存在しませんでした。残念。

$ docker container run --rm -it alpine:3.9 / # cat /etc/os-release NAME="Alpine Linux" ID=alpine VERSION_ID=3.9.6 PRETTY_NAME="Alpine Linux v3.9" HOME_URL="https://alpinelinux.org/" BUG_REPORT_URL="https://bugs.alpinelinux.org/" / # apk add -u -q banner ERROR: unsatisfiable constraints: banner (missing): required by: world[banner]