码迷,mamicode.com
首页 > 系统相关 > 详细

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

时间:2014-12-24 14:41:13      阅读:270      评论:0      收藏:0      [点我收藏+]

标签:

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

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放置相关脚本

 

[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

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

标签:

原文地址:http://www.cnblogs.com/gsblog/p/4182379.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!