海纳思HINAS系统删除终端登录后的欢迎语
在正式开始本内容之前,或许你想知道海纳思HINAS系统一键删除预装软件
海纳思系统终端登录后,你会看到一个欢迎语界面,如果我们希望恢复成 Ubuntu 系统默认的,该怎么做?
第一步 到达指定目录
通过【页面终端】或者 ssh ,使用 root 用户登录到海纳思系统,并切换到指定目录:
cd /etc/profile.d/
第二步 查看欢迎语的相关文件
使用 ll 命令 显示文件详细信息列表
root@hi3798mv100:/etc/profile.d# ll
total 24
drwxrwxrwx 2 root root 4096 Aug 9 09:12 ./
drwxr-xr-x 81 root root 4096 Nov 9 18:24 ../
-rwxrwxrwx 1 root root 96 Dec 5 2019 01-locale-fix.sh*
-rwxrwxrwx 1 root root 1430 Aug 9 09:12 90-bash-init.sh*
-rwxrwxrwx 1 root root 1921 Aug 9 09:12 99-helloworld.sh*
-rwxrwxrwx 1 root root 729 Feb 2 2020 bash_completion.sh*
- 仅首次进入终端显示的文件:90-bash-init.sh
- 欢迎语的文件:99-helloworld.sh
使用 cat 命令,可以查看内容,以查看 90-bash-init.sh 为例
root@hi3798mv100:/etc/profile.d# cat 90-bash-init.sh
clear
alias copyright='rm /var/etc/copyright ; /etc/profile.d/90-bash-init.sh'
IP=$(ifconfig eth0 | grep '\<inet\>'| grep -v '127.0.0.1' | awk '{print $2}' | awk 'NR==1')
if [ ! -e /var/etc/copyright ] 2> /dev/null
then
echo -e "欢迎使用 \e[31m海纳思 $(getconf LONG_BIT)-bit 系统\e[0m
原创作者: \e[32m神雕Teasiu\e[0m
贡献成员: Hyy2001 MinaDee Xjm
教程地址: http://$IP
官网地址: https://www.ecoo.top
社区地址: https://bbs.histb.com | 欢迎访问我们的社区, 你的肯定是对我们最大的支持!
版权声明:\e[31m
1. 作者唯一闲鱼账号: 神雕teasiu
2. 本系统仅在官网发布, 任何人均可免费下载安装和使用
3. 如果你是在不良奸商手上购买本系统, 请尝试协商退款或予以差评
3. 本系统开通的服务仅仅用于学习研究, 不得用于任何非法用途
4. 未经作者授权, 不得将系统用于盈利售卖, 不得用于衍生的任何软件变相收费, 否则视为侵权行为
\e[0m
"
echo -e "提示: \e[31m本内容仅显示一次, 烦请仔细阅读, 后续执行 'copyright' 指令即可再次阅读本页面!\e[0m\n"
echo -e "提示: \e[31m本内容仅显示一次, 请首次进入终端后更改root和ubuntu用户密码为强密码!\e[0m\n"
sleep 3
echo -ne "\e[32m" ; read -p "如果你同意以上内容, 请按下 [回车] 键以继续 ..." Key ;echo -ne "\e[0m"
date > /var/etc/copyright
. /etc/profile
fi
第三步 删除这两个文件
root@hi3798mv100:/etc/profile.d# rm 90-bash-init.sh 99-helloworld.sh
root@hi3798mv100:/etc/profile.d# ll
total 16
drwxrwxrwx 2 root root 4096 Nov 9 18:37 ./
drwxr-xr-x 81 root root 4096 Nov 9 18:24 ../
-rwxrwxrwx 1 root root 96 Dec 5 2019 01-locale-fix.sh*
-rwxrwxrwx 1 root root 729 Feb 2 2020 bash_completion.sh*
root@hi3798mv100:/etc/profile.d#
再次登录,看到的就是 Ubuntu 默认的欢迎语了。