1、问题背景
在Linux系统上安装java环境时,在编辑profile文件输入jdk环境变量时,把export 写成exprot ,导致在source /etc/profile的时候出现这个-bash:exprot:command not found
export JAVA_HOME=/opt/software/jdk11
export PATH=$JAVA_HOME/bin:$PATH
2、解决办法
输入vi /etc/profile
命令,并按i健进入编辑模式,把exprot
修改为export
然后,按Esc退出编辑模式,然后输入:wq 退出vi /etc/profile
,接着输入source /etc/profile测试成功