Ubuntu--欢迎界面

为什么要写这个?
单纯想记录

存放位置

cd /etc/update-motd.d

输入这行命令进入到Ubuntu欢迎界面配置存放的位置

默认

下面是默认的欢迎界面

每个版本的欢迎信息可能都会不太一样,例如我的是 Ubuntu 22.04.2 LTS

这里面很多的信息都不太重要,所以我会选择将它们都不显示,最后的效果长这样

看着简洁多了,而且还加入了一些自己的文案。

修改

当在 /etc/update-motd.d/的目录下时,输入ls显示所有的目录信息。

这些脚本的执行顺序是按照文件名前面的序号进行依次执行的,所以我们就可以简单修改一下里面的内容。

00-header

#!/bin/sh
#
#    00-header - create the header of the MOTD
#    Copyright (C) 2009-2010 Canonical Ltd.
#
#    Authors: Dustin Kirkland <kirkland@canonical.com>
#
#    This program is free software; you can redistribute it and/or modify
#    it under the terms of the GNU General Public License as published by
#    the Free Software Foundation; either version 2 of the License, or
#    (at your option) any later version.
#
#    This program is distributed in the hope that it will be useful,
#    but WITHOUT ANY WARRANTY; without even the implied warranty of
#    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
#    GNU General Public License for more details.
#
#    You should have received a copy of the GNU General Public License along
#    with this program; if not, write to the Free Software Foundation, Inc.,
#    51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
​
exportTERM=xterm
/usr/bin/clear
​
[ -r /etc/lsb-release ] && . /etc/lsb-release
​
if [ -z"$DISTRIB_DESCRIPTION" ] && [ -x /usr/bin/lsb_release ]; then
  # Fall back to using the very slow lsb_release utility
  DISTRIB_DESCRIPTION=$(lsb_release -s -d)
fi
​
printf "Welcome to %s (%s %s %s)\n""$DISTRIB_DESCRIPTION""$(uname -o)""$(uname -r)""$(uname -m)"

10-help-text

#!/bin/sh
#
#    10-help-text - print the help text associated with the distro
#    Copyright (C) 2009-2010 Canonical Ltd.
#
#    Authors: Dustin Kirkland <kirkland@canonical.com>,
#             Brian Murray <brian@canonical.com>
#
#    This program is free software; you can redistribute it and/or modify
#    it under the terms of the GNU General Public License as published by
#    the Free Software Foundation; either version 2 of the License, or
#    (at your option) any later version.
#
#    This program is distributed in the hope that it will be useful,
#    but WITHOUT ANY WARRANTY; without even the implied warranty of
#    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
#    GNU General Public License for more details.
#
#    You should have received a copy of the GNU General Public License along
#    with this program; if not, write to the Free Software Foundation, Inc.,
#    51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
​
# printf "\n"
# printf " * Documentation:  https://help.ubuntu.com\n"
# printf " * Management:     https://landscape.canonical.com\n"
# printf " * Support:        https://ubuntu.com/advantage\n"

88-esm-announce

#!/bin/sh
# stamp="/var/lib/ubuntu-advantage/messages/motd-esm-announce"
​
# [ ! -r "$stamp" ] || cat "$stamp"

97-overlayroot

#!/bin/sh
​
(egrep "overlayroot|/media/root-ro|/media/root-rw" /proc/mounts 2>/dev/null | sort-r) || true
​
echo"If you don't donate, you will succeed!"
​
printf "\n"
  • 0
    点赞
  • 2
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
很高兴能帮到你!下面是 Ubuntu 20.04 系统的安装步骤及图文教程: 步骤 1:下载 Ubuntu 20.04 ISO 镜像文件 首先,你需要从 Ubuntu 官方网站上下载 Ubuntu 20.04 的 ISO 镜像文件。请确保下载与你的计算机硬件架构匹配的镜像文件。 步骤 2:制作启动盘 接下来,你需要将下载的 ISO 镜像文件制作成可启动的安装盘。你可以使用 Rufus、Unetbootin 或者 Etcher 等工具来制作启动盘。选择一个你熟悉的工具,将 ISO 镜像文件写入 U 盘。 步骤 3:设置 BIOS/UEFI 在安装 Ubuntu 之前,你需要进入计算机的 BIOS 或者 UEFI 设置界面,将启动顺序设置为首先从 U 盘启动。不同品牌的计算机进入设置界面的方法可能不同,请自行查阅计算机的说明手册。 步骤 4:启动安装程序 将制作好的启动盘插入计算机,重新启动计算机。计算机会从 U 盘启动,并进入 Ubuntu 安装程序。在安装程序的欢迎界面上,选择“Install Ubuntu”。 步骤 5:选择语言和键盘布局 在接下来的界面上,选择你希望使用的语言和键盘布局,然后点击“Continue”。 步骤 6:选择安装类型 在安装类型界面上,你可以选择直接安装 Ubuntu,或者进行其他高级设置。如果你不确定,可以选择默认的安装选项。 步骤 7:设置分区 分区设置界面上,你可以选择自动分区或手动分区。自动分区会将整个硬盘用于 Ubuntu 安装。如果你希望保留其他操作系统或进行其他自定义设置,请选择手动分区。 步骤 8:设置用户名和密码 在设置用户名和密码界面上,输入你希望使用的用户名和密码。你还可以选择是否自动登录。 步骤 9:开始安装 完成上述设置后,点击“Install”按钮开始安装 Ubuntu。安装过程可能需要一些时间,请耐心等待。 步骤 10:完成安装 安装完成后,系统会提示你重新启动计算机。点击“Restart Now”按钮,计算机会重新启动,并进入安装好的 Ubuntu 系统。 至此,你已经完成了 Ubuntu 20.04 系统的安装。希望这个图文教程能对你有所帮助!如果还有其他问题,请随时提问。
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值