Centos configuration welcome message

Location: CST + 8

System environment language: English US (UTF-8)

Keyboard: English US

Note: When the task is to configure TLS, please add the root certificate or self-signed certificate to the trusted zone.

After logging in to the console, whether it is a network login or a local login, the welcome message content below will be displayed.

*********************************

ChinaSkills 2022–CSK

Module CLinux

>>hostname<<

>>System Version<<

>> TIME <<

*********************************


1. Query the area you are in

[root@appsrv /]#  timedatectl |grep "Time zone"  
       Time zone: Asia/Shanghai (CST, +0800)
#这里安装Centos界面即可设置
[root@appsrv /]# timedatectl list time-zones 
#查看区市信息
[root@appsrv /]# timedatectl set-timezone Asia/Shanghai
#也可以自己设置

 

2. Create login information script

[root@appsrv /]# nano /login.sh  
#!/bin/bash
echo "      *********************************"
echo "               ChinaSkills 2022-CSK"
echo "                    Module CLinux"
echo " "
echo " "
echo "                    >>`hostname`<<"
echo "      >>`cat /etc/redhat-release`<<"
echo "      >>`date`<<"
echo "      *********************************"

 

3. Write the script file into the environment variable

[root@appsrv /]# nano /root/.bash_profile  
bash /login.sh
#创建一个空sj文件就不会显示输出本地控制台日志
[root@appsrv /]# touch ~/.unlog

 

4. Set ssh login display information

[root@appsrv /]# nano /etc/ssh/sshd_config PrintLastLog no 

5. Test

1eb30a1d51466ca0387832c1f5857277.png

local login

When in command line mode

1. Press ctrl+alt+f1

2. After logging in as a user, enter init 5

In the graphical interface

1. Press ctrl+alt+f3 (at any time, not limited to the following screens)

2. Enter init 3 in the terminal

e88d3a2f37a1c442182a45eb8d19c9d2.png

85aa2f3271db86a37958a65ff4bcd181.png

 

 

 

Guess you like

Origin blog.csdn.net/LLLLLoodwd/article/details/131325141