表題の通り。
■ 環境
- Alpine Linux 3.3.3
- VirtualBox
- Mac OSX El Capitan
■ motd
ログイン時に下記のメッセージが表示されるが、不要なので削除したい。
$ ssh -l root -p 22222 localhost
root@localhost's password:
Welcome to Alpine!
The Alpine Wiki contains a large amount of how-to guides and general
information about administrating Alpine systems.
See <http://wiki.alpinelinux.org>.
You can setup the system with the command: setup-alpine
You may change this message by editing /etc/motd.
localhost:~#
メッセージに表示の通り、`/etc/motd`を編集する。今回は下記のようにした。
localhost:~# cat /etc/motd
Welcome to Alpine!
localhost:~#
ログインしてみる。
$ ssh -l root -p 22222 localhost
root@localhost's password:
Welcome to Alpine!
localhost:~#
満足。
ちなみに他のOSだと、`update-motd`で`/etc/motd`ファイルが更新されたりするが、Alpine Linuxではそういうことは無いようである。
更にAlpine LinuxのDockerコンテナを確認すると、`/etc/motd`は下記のようになっている。
/ # cat /etc/motd
Welcome to Alpine!
The Alpine Wiki contains a large amount of how-to guides and general
information about administrating Alpine systems.
See <http://wiki.alpinelinux.org>.
You can setup the system with the command: setup-alpine
You may change this message by editing /etc/motd.
/ #
しかしDockerの場合はSSHでログインしているわけではないので、この`/etc/motd`は使用されない。
以上。