文章详情

  • 游戏榜单
  • 软件榜单
关闭导航
热搜榜
热门下载
热门标签
php爱好者> php文档>Linux shell系统下执行export及使用man bash

Linux shell系统下执行export及使用man bash

时间:2010-10-10  来源:mydear

给大家推荐一款很不错的Linux shell系统很有学习价值,这里我主要讲解Linux shell系统的应用,包括介绍Linux shell知识等方面。

一、在Linux shell下,执行export:

declare -x LANG="en_US"这个LANE环境变量,就是我们希望去修改的,但是在哪里修改,比较合适呢?

二、Linux shell使用man bash:

When bash is invoked as an interactive login shell, or as a non-interactive shell with the --login option, it first reads and executes commands from the file /etc/profile, if that file exists. After reading that file, it looks for ~/.bash_profile, ~/.bash_login, and ~/.profile, in that order, and reads and executes commands from the first one that exists and is readable. The --noprofile option may be used when the shell is started to inhibit this behavior.

即bash在登录时,会依次读取这些配置文件:

  1. /etc/profile
  2. /.bash_profile
  3. /.bash_login
  4. /.profile

三、对于Linux shell的默认语言

应该在系统级的文件中(/etc/profile)修改,以便修改的结果可以被每一个用户继承:打开/etc/profile,直接在其上,找不到 关于LANG变量的设置命令,但细心观察,该脚本还执行了其他脚本:for i in /etc/profile.d/*.sh ; doif [ -r "$i" ]; then . $i fi done

四、到/etc/profile.d/目录下,查看这些*.sh的脚本,发现了一个名为"lang.sh"的文件,应该就是它了:

打开/etc/profile.d/lang.sh,开头几句:for langfile in /etc/sysconfig/i18n $HOME/.i18n ; do[ -f $langfile ] && . $langfile && sourced=1done这个/etc/sysconfig/i18n,就是设置系统默认语言的地方,对于我的系统,现在它的内容如下:

  1. LANG="en_US"
  2. SUPPORTED="en_US:en"
  3. SYSFONT="lat0-sun16"
  4. SYSFONTACM="iso01"

如果,你希望系统的默认语言变更为UTF-8,可以把LANG修改为:LANG="en_US.UTF-8"


相关阅读 更多 +
排行榜 更多 +
辰域智控app

辰域智控app

系统工具 下载
网医联盟app

网医联盟app

运动健身 下载
汇丰汇选App

汇丰汇选App

金融理财 下载