From Fedora Project Wiki

 

Latest revision as of 16:33, 1 January 2011

主要配置文件

Linux中的配置文件很多,下面列出几个大家常用的。欢迎大家补充!

用户目录

/home/$USER/.bash_profile
/home/$USER/.bashrc

.bash_profile主要存放环境变量和启动程序

Fedora10已经将一部分变量加了进去,这是跟以往的Fedora的区别。

.bashrc则存放命令别名和函数 比如我的.bashrc是这样的:

 
 # .bashrc
 # Source global definitions
 if [ -f /etc/bashrc ]; then
        . /etc/bashrc
 fi
 # User specific aliases and functions
 PS1="[\u@\W ^_^]$"
 alias ll="ls -l"
 alias zhcon="zhcon --utf8"
 setterm -foreground green
 figlet -w 150 'Welcome To Linux'
 alias privoxy=" privoxy --user tt /usr/local/etc/privoxy/config "

里面的PS1定义了shell提示符的样式,alias就是设置了命令的别名 这个里面也可以添加想要运行的程序。比如figlet,这样在你登录到shell后会用figlet打出一行字"Welcome To Linux"

etc目录

 
 /etc/inittab   #这个里面定义了启动的runlevel,还有其他一些东西,
 id:5:initdefault:    #这个就是对runlevel的定义..

另外还有

 /etc/X11/xorg.conf    #关于图形界面的配置文件
 /etc/yum.conf    #yum的配置文件