修改linux shell登陆欢迎信息
2015-06-17 22:47
531 查看
Ubuntu欢迎信息保存在/etc/update-motd.d/,修改其中的文件即可修改欢迎信息
修改相应文件后,执行
生效
默认欢迎信息:
例如修改00-header:
然后新建文件/etc/kylin:
然后执行:run-parts /etc/update-motd.d/,效果:
~# ls /etc/update-motd.d/ 00-header 10-help-text 90-updates-available 91-release-upgrade 98-fsck-at-reboot 98-reboot-required
修改相应文件后,执行
~# run-parts /etc/update-motd.d/
生效
默认欢迎信息:
Welcome to Ubuntu 14.04 LTS (GNU/Linux 3.13.0-24-generic x86_64) * Documentation: https://help.ubuntu.com/ 260 packages can be updated. 130 updates are security updates. You have new mail. Last login: Wed Jun 17 22:21:45 2015 from service
例如修改00-header:
[ -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" "My OS" "$(uname -o)" "$(uname -r)" "$(uname -m)" cat /etc/kylin
然后新建文件/etc/kylin:
,. -|` .*) -!:?);?: -,):???????" -"????????????, ,????????????:!` -|| `*????????????"- `(*:;; ,;???????????????"(.` `(?????" `(??????????????????;:*(,.` -')*"*())(,` (????????????????????????;??,- *?????????????????????????? .?????;;???;")!.` .*???????( !???(` `-` .)??"!*????* `!??' .(:?;,` !??:). .???` .?!!.` .???>
然后执行:run-parts /etc/update-motd.d/,效果:
Welcome to My OS (GNU/Linux 3.13.0-24-generic x86_64) ,. -|` .*) -!:?);?: -,):???????" -"????????????, ,????????????:!` -|| `*????????????"- `(*:;; ,;???????????????"(.` `(?????" `(??????????????????;:*(,.` -')*"*())(,` (????????????????????????;??,- *?????????????????????????? .?????;;???;")!.` .*???????( !???(` `-` .)??"!*????* `!??' .(:?;,` !??:). .???` .?!!.` .???> * Documentation: https://help.ubuntu.com/ You have new mail. Last login: Wed Jun 17 22:24:35 2015 from 192.168.7.2
相关文章推荐
- shell 文本单词计数
- delphi Service里Shellexecute打开cmd返回ERROR_ACCESS_DENIED(权限不足)
- hadoop 创建用户及hdfs权限,hdfs操作等常用shell命令
- shell命令之split
- Shell 基础
- shell tr 命令
- shell 的cut 命令用法
- shell中if语句特殊参数
- shell与export命令
- win7 xshell登录虚拟机的centos
- #!/bin/bash(转)
- 配置NDK Cygwin .bash_profile:行47: 语法错误: 未预期的文件结尾 syntax error: unexpected end of file 解决
- .bash_profile和.bashrc的区别和设置生效
- Linux shell 中$() ` `,${},$[] $(()),[ ] (( )) [[ ]]作用与区别
- shell与export命令
- linux下shell脚本编程1
- Shell命令:echo介绍,echo如何输出带颜色的文本
- bash脚本输入密码不回显
- 修改xshell字体
- PowerShell:Power Shell 安装