Debian 分段错误

Debian 分段错误

编辑 .bashrc 后,出现“分段错误”错误。这是我在 bashrc 中添加的内容:

if [ -f ~/.bashrc ];
then
    source ~/.bashrc
fi

# If not running interactively, don't do anything
[ -z "$PS1" ] && return

# some more ls aliases
alias ll='ls -l'

# enable programmable completion features (you don't need to enable
# this, if it's already enabled in /etc/bash.bashrc and /etc/profile
# sources /etc/bash.bashrc).
if [ -f /etc/bash_completion ]; then
        . /etc/bash_completion
fi

PS1="\[\e[1;37m\](\#) \[\e[1;33m\]\D{%H:%M:%S} \[\e[0;32m\]\[\e[1;31m\]\u\[\e[1;36m\]@\h:\[\e[1;32m\]\w\[\e[1;35m\]#\[\e[m\] "

export PATH=$PATH:/usr/local/sbin:/usr/sbin

然后我执行bash重新加载配置文件:

~$ bash
Segmentation fault

作为信息,我正在使用:

~$ cat /etc/debian_version 
7.7

另一件事,我的 bashrc 没有加载。例子:

~$ ll /etc/
-bash: ll: command not found

答案1

一开始你是递归采购的~/.bashrc。您可能想包含/etc/bashrc在内。结果,bash 在解析过程中因堆栈溢出而终止。

相关内容