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
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章