设置Linux环境的欢迎登陆信息

1、编辑/etc/profile文件添加如下内容:

1
2
3
4
5
6
7
8
9
for i in /etc/profile.d/*.sh ; do
    if [ -r "$i" ]; then
        if [ "${-#*i}" != "$-" ]; then
            . "$i"
        else
            . "$i" >/dev/null 2>&1
        fi 
    fi 
done

  

2、在/etc/profile.d放置相关脚本

 

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
[root@typhoeus79 ice_test_m profile.d]# ll
总计 140
-rwxr-xr-x 1 root root  764 2009-09-04 colorls.csh
-rwxr-xr-x 1 root root  725 2009-09-04 colorls.sh
-rwxr-xr-x 1 root root   78 2009-09-04 cvs.sh
-rwxr-xr-x 1 root root  192 2009-03-25 glib2.csh
-rwxr-xr-x 1 root root  192 2009-03-25 glib2.sh
-rw-r--r-- 1 root root  125 2012-03-01 java.sh
-rw-r--r-- 1 root root  218 2004-09-09 krb5-devel.csh
-rw-r--r-- 1 root root  229 2006-01-20 krb5-devel.sh
-rw-r--r-- 1 root root  218 2004-09-09 krb5-workstation.csh
-rw-r--r-- 1 root root  229 2006-01-20 krb5-workstation.sh
-rwxr-xr-x 1 root root 2959 2009-09-29 lang.csh
-rwxr-xr-x 1 root root 3234 2009-09-29 lang.sh
-rwxr-xr-x 1 root root  122 2009-09-27 less.csh
-rwxr-xr-x 1 root root  108 2009-09-27 less.sh
-rwxr-xr-x 1 root root   38 12-23 12:52 motd.sh
-rwxr-xr-x 1 root root   97 2009-09-20 vim.csh
-rwxr-xr-x 1 root root  293 2009-09-20 vim.sh
-rwxr-xr-x 1 root root  170 2007-01-07 which-2.sh
-rwxr-xr-x 1 root root   18 12-24 14:20 yum_var.sh

  

 

3、简单的文本信息设置

http://www.blogjava.net/baizhihui19870626/articles/372694.html

 

The Bash Shell Startup Files

http://www.linuxfromscratch.org/blfs/view/svn/postlfs/profile.html

 

鸟哥私房菜的介绍

http://linux.vbird.org/linux_basic/0320bash.php#settings_issue

posted @   小郭学路  阅读(200)  评论(0编辑  收藏  举报
编辑推荐:
· AI与.NET技术实操系列:使用Catalyst进行自然语言处理
· 分享一个我遇到过的“量子力学”级别的BUG。
· Linux系列:如何调试 malloc 的底层源码
· AI与.NET技术实操系列:基于图像分类模型对图像进行分类
· go语言实现终端里的倒计时
阅读排行:
· 历时 8 年,我冲上开源榜前 8 了!
· 物流快递公司核心技术能力-海量大数据处理技术
· 四大AI编程工具组合测评
· 关于能否用DeepSeek做危险的事情,DeepSeek本身给出了答案
· 如何在 Github 上获得 1000 star?
历史上的今天:
2013-12-24 pt-mext
2013-12-24 MySQL性能建议者mysqltuner.pl和pt-variable-advisor
点击右上角即可分享
微信分享提示