码迷,mamicode.com
首页 > 系统相关 > 详细

Linux修改History历史命令数量

时间:2019-12-22 18:48:13      阅读:155      评论:0      收藏:0      [点我收藏+]

标签:history   path   line   vim   library   src   histsize   配置   def   

技术图片

 

 

 ****打开  vim  /etc/profile

vim  /etc/profile

 

 追加配置

# /etc/profile: system-wide .profile file for the Bourne shell (sh(1))
# and Bourne compatible shells (bash(1), ksh(1), ash(1), ...).

if [ "$PS1" ]; then
if [ "$BASH" ] && [ "$BASH" != "/bin/sh" ]; then
# The file bash.bashrc already sets the default PS1.
# PS1=‘\h:\w\$ ‘
if [ -f /etc/bash.bashrc ]; then
| . /etc/bash.bashrc
fi
else
if [ "`id -u`" -eq 0 ]; then
| PS1=‘# ‘
else
| PS1=‘$ ‘
fi
fi
fi

if [ -d /etc/profile.d ]; then
for i in /etc/profile.d/*.sh; do
if [ -r $i ]; then
| . $i
fi
done
unset i
fi

# history command max line config
export HISTSIZE=50000

export PATH=$PATH:/usr/local/go/bin
#set java environment
JAVA_HOME=/usr/java/jdk-10.0.1
CLASSPATH=$JAVA_HOME/lib/
PATH=$JAVA_HOME/bin:$PATH
export PATH JAVA_HOME CLASSPATH PATH
export JRE_HOME=/usr/java/jdk-10.0.1/jre

export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$JRE_HOME/lib/amd64/server:$JRE_HOME/lib/amd64


export GOROOT=/usr/local/go

PATH=$GOROOT/bin:$PATH

 

 

*** 配置文件生效

source /etc/profile

Linux修改History历史命令数量

标签:history   path   line   vim   library   src   histsize   配置   def   

原文地址:https://www.cnblogs.com/20170722-kong/p/12080252.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!