shell用户个人配置文件
注:这里是bash环境,如果是csh请把export改成setenv 并用setenv用法(其实就是setenv HISTSIZE 100),在bash中可以把下面内容放在~/.bashrc或者是~/.bash_profile
中,如果是csh就放在~/.cshrc,如果想对所有用户生效,请放在/etc/profile中,一般这些文都有内容可以接着下面写。
1,历史命令记录数100条
#1,Environment variables
export HISTSIZE=100
2,PS1值
#2,Sheel prompt-Bash
export PS1="\t \u@\h (\w) [\!]$"
3,MASK值,新建文件夹权限700,新建文件权限600
#3,File creation mask
umask 077
4,STTY
#4,Terminal settings (for remote host only)
stty erase ^H
5,DATE
#5,Display welcome message
echo "Welcome tao"
echo "Today is `date`."
echo
6,系统登录用户信息
#6,System information
echo "Last three logins:";last `logname` |head -3
echo
echo "Current users: `users`"
echo
echo "System uptime:";uptime
echo
echo "There are `who | wc -l` userids logged in right now."
7,默认编辑器VIM ,翻页器LESS
#8,default pager ,editor
export PAGER=less
export LESS='-CFMs'
export EDITOR=vim
8,如果没有操作默认300秒断开
export TMOUT=300
9,给MAN命令加上颜色
9# man pages in color
export LESS_TERMCAP_mb=$'\E[01;31m'
export LESS_TERMCAP_md=$'\E[01;31m'
export LESS_TERMCAP_me=$'\E[0m'
export LESS_TERMCAP_se=$'\E[0m'
export LESS_TERMCAP_so=$'\E[01;44;33m'
export LESS_TERMCAP_ue=$'\E[0m'
export LESS_TERMCAP_us=$'\E[01;32m'j
推荐阅读:
相关推荐
<?php. if (!empty($_POST)) {. $data1 = $_POST["data1"];$data2 = $_POST["data2"];$fuhao = $_POST["fuh