linux profile
#配置文件 #/etc/profile #refresh env alias renv='source /etc/profile' alias venv="code /etc/profile" #enables color in the terminal bash shell export export CLICOLOR=1 #setsup thecolor scheme for list export export LSCOLORS=gxfxcxdxbxegedabagacad #HISTFILESIZE 定义了在 .bash_history 中保存命令的记录总数,可以理解为.bash_history文件中最多只有HISTFILESIZE行 #HISTSIZE 定义了 history 命令输出的记录数,即输出.bash_history文件中的最后HISTSIZE行 export HISTFILESIZE=10000 export HISTSIZE=500 export HISTIGNORE="&:[bf]g:exit" #命令行头 PS1='\[\033[1;30m\]\u:\[\033[01;34m\]\w\[\033[00m\]\[\033[1;30m\]\$\[\033[00m\] ' #定义变量 #export some_path=/Users/some/path #export LI=$some_path/in.txt #向path添加环境变量 export PATH=$PATH:/home/x/cfg/cmd #cd alias ..="cd .." alias ...="cd ../.." alias ....='cd ../../..' alias cdr="cd -" #ls alias ll='ls -aoF' alias la='ls -ACF' alias l='ls -CF' #ps alias pscpu='ps aux|head -1;ps aux|grep -v PID|sort -rn -k3|head -29' alias psmem='ps aux|head -1;ps aux|grep -v PID|sort -rn -k4|head -29' #git alias gitck='git checkout ' alias gitbr='git branch ' alias gs='git status' alias gg="git log --graph --abbrev-commit --decorate --format=format:'%C(bold blue)%h%C(reset) - %C(dim white)%aD%C(reset) %C(dim white)(%ar) %C(dim white)- %an%C(reset) %C(reset)%C(bold yellow)%d%C(reset)%n'' %C(white)%s%C(reset)' --all" alias ggc="git log --graph --abbrev-commit --decorate --format=format:'%C(bold blue)%h%C(reset) - %C(dim white)%aD%C(reset) %C(dim white)(%ar) %C(dim white)- %an%C(reset) %C(reset)%C(bold yellow)%d%C(reset)%n'' %C(white)%s%C(reset)' --all -c" alias ggs="git log --graph --abbrev-commit --decorate --format=format:'%C(bold blue)%h%C(reset) - %C(dim white)%aD%C(reset) %C(dim white)(%ar) %C(dim white)- %an%C(reset) %C(reset)%C(bold yellow)%d%C(reset)%n'' %C(white)%s%C(reset)' --all --stat"
在/etc/profile 开始添加
. /home/name/cfg/bashcfg.txt
#配置文件 #/etc/profile #refresh env alias renv='source /etc/profile' alias venv="code /etc/profile" #enables color in the terminal bash shell export export CLICOLOR=1 #setsup thecolor scheme for list export export LSCOLORS=gxfxcxdxbxegedabagacad #HISTFILESIZE 定义了在 .bash_history 中保存命令的记录总数,可以理解为.bash_history文件中最多只有HISTFILESIZE行 #HISTSIZE 定义了 history 命令输出的记录数,即输出.bash_history文件中的最后HISTSIZE行 export HISTFILESIZE=10000 export HISTSIZE=500 export HISTIGNORE="&:[bf]g:exit" #命令行头 PS1='\[\033[1;30m\]\u:\[\033[01;34m\]\w\[\033[00m\]\[\033[1;30m\]\$\[\033[00m\] ' #定义变量 #export some_path=/Users/some/path #export LI=$some_path/in.txt export JAVA_HOME=/home/x/Documents/install/jdks/jdk1.8.0_161 export PATH=$PATH:${JAVA_HOME}/bin export CLASSPATH=.:$JAVA_HOME/lib/dt.jar:$JAVA_HOME/lib/tools.jar export GRADLE_HOME=/home/x/Documents/install/gradles/6.7/gradle-6.7 export PATH=$PATH:${GRADLE_HOME}/bin export GRADLE_USER_HOME=/home/x/Documents/gradlecache #向path添加环境变量 export PATH=$PATH:/home/x/cfg/cmd:. export PATH=$PATH:/home/x/Documents/install/chrome-linux alias ..="cd .." alias ...="cd ../.." alias ....='cd ../../..' alias cdr="cd -" #ls alias ll='ls -aoF' alias la='ls -ACF' alias l='ls -CF' #ps alias pscpu='ps aux|head -1;ps aux|grep -v PID|sort -rn -k3|head -29' alias psmem='ps aux|head -1;ps aux|grep -v PID|sort -rn -k4|head -29' #git alias gitck='git checkout ' alias gitbr='git branch ' alias gs='git status' alias gg="git log --graph --abbrev-commit --decorate --format=format:'%C(bold blue)%h%C(reset) - %C(dim white)%aD%C(reset) %C(dim white)(%ar) %C(dim white)- %an%C(reset) %C(reset)%C(bold yellow)%d%C(reset)%n'' %C(white)%s%C(reset)' --all" alias ggc="git log --graph --abbrev-commit --decorate --format=format:'%C(bold blue)%h%C(reset) - %C(dim white)%aD%C(reset) %C(dim white)(%ar) %C(dim white)- %an%C(reset) %C(reset)%C(bold yellow)%d%C(reset)%n'' %C(white)%s%C(reset)' --all -c" alias ggs="git log --graph --abbrev-commit --decorate --format=format:'%C(bold blue)%h%C(reset) - %C(dim white)%aD%C(reset) %C(dim white)(%ar) %C(dim white)- %an%C(reset) %C(reset)%C(bold yellow)%d%C(reset)%n'' %C(white)%s%C(reset)' --all --stat"