Когда я захожу в свою коробку Ubuntu, я вижу вывод ниже. Я был удивлен, увидев цитату и ссылку на статью TechRepublic.
Это реклама? Кто-нибудь знает, откуда это? Есть ли способ удалить это?
Спасибо, Бен
Welcome to Ubuntu 20.04 LTS (GNU/Linux 5.4.0-37-generic x86_64)
* Documentation: https://help.ubuntu.com
* Management: https://landscape.canonical.com
* Support: https://ubuntu.com/advantage
System information as of Sun 21 Jun 2020 10:06:54 PM PDT
System load: 0.05 Processes: 249
Usage of /: 43.6% of 227.74GB Users logged in: 0
Memory usage: 8% IPv4 address for enp0s25: <redacted>
Swap usage: 0% IPv4 address for wlp2s0: <redacted>
Temperature: 56.0 C
* "If you've been waiting for the perfect Kubernetes dev solution for
macOS, the wait is over. Learn how to install Microk8s on macOS."
https://www.techrepublic.com/article/how-to-install-microk8s-on-macos/
0 updates can be installed immediately.
0 of these updates are security updates.
В этом файле:
/etc/pam.d/sshd
Закомментируйте следующие 2 строки:
# session optional pam_motd.so motd=/run/motd.dynamic
# session optional pam_motd.so noupdate
Это должно удалить MOTD.
Ссылка на статью TechRepublic берется из выходных данных этого скрипта, который выполняется для каждого входа в систему:
/etc/update-motd.d/50-motd-news
Вы можете отключить только этот скрипт, удалив разрешения на выполнение:
sudo chmod -x /etc/update-motd.d/50-motd-news
Другой подход - указать ENABLED = 0
в файле конфигурации / etc / default / motd-news
. Это может быть предпочтительным на основе обзора /etc/update-motd.d/50-motd-news
:
$ grep -A5 Source /etc/update-motd.d/50-motd-news
# Source the local configuration
[ -r /etc/default/motd-news ] && . /etc/default/motd-news
# Exit immediately, unless we're enabled
# This makes this script very easy to disable in /etc/default/motd-news configuration
[ "$ENABLED" = "1" ] || exit 0
Вы можете обновить / etc / default / motd-news
в выбранном вами редакторе либо используйте sed или perl. Обратите внимание, что требуются права root:
sudo sed -i -e 's/ENABLED=1/ENABLED=0/' /etc/default/motd-news