Linuxの远程登录工具访问Linux都会提示【-bash: “export: command not found】的问题处理
每次远程登录都会提示bash: “export: command not found
根据提示肯定是某个设置文件包含了特殊的中文符号,导致系统无法加载
Connecting to xxx.xxx.xxx.xxx:2259...
Connection established.
Escape character is '^@]'.
Last login: Fri Mar 1 01:39:34 2019 from 219.135.157.140
-bash: “export: command not found
-bash: “export: command not found
查看远程登录时候,会自行加载的几个文件(~/.bash_profile ~/.bashrc /etc/profile)
[root@bigdata ~]# grep export /root/. ./ .bash_history .bash_profile .cshrc .tcshrc ../ .bash_logout .bashrc .ssh/ .viminfo [root@bigdata ~]# grep export /root/.bash .bash_history .bash_logout .bash_profile .bashrc [root@bigdata ~]# grep export /root/.bash_profile export PATH [root@bigdata ~]# grep export /root/.bashrc “export EDITOR=/usr/bin/vim“ “export EDITOR=/usr/bin/vim“ [root@bigdata ~]# cat .bashrc # .bashrc # User specific aliases and functions alias rm='rm -i' alias cp='cp -i' alias mv='mv -i' # Source global definitions if [ -f /etc/bashrc ]; then . /etc/bashrc fi “export EDITOR=/usr/bin/vim“ “export EDITOR=/usr/bin/vim“
修改文件去掉特殊符号后重新登录,问题解决
Connecting to xxx.xxx.xxx.xxx:2259... Connection established. Escape character is '^@]'. Last login: Fri Mar 1 02:31:41 2019 from 219.135.157.140 [root@bigdata ~]# [root@bigdata ~]#