ubuntu使用
2021-07-10 20:12:51 # other

BASH命令行TAB键补全失效

1
2
3
4
5
6
7
8
9
10
11
12
13
14
# 打开文件 取消注释
sudo vi /etc/bash.bashrc
#enable bash completion in interactive shells
#if ! shopt -oq posix; then
# if [-f /usr/share/bash-completion/bash_completion ]; then
# . /usr/share/bash-completion/bash_completion
# elif [ -f /etc/bash_completion]; then
# . /etc/bash_completion
# fi
#fi
# 保存
:wq
# 生效
source /etc/bash.bashrc

目录路径过长改为当前目录

1
2
3
4
5
6
sudo vim ~/.bashrc
if [ "$color_prompt" = yes ]; then
PS1='${debian_chroot:+($debian_chroot)}\[\033[01;32m\]\u@\h\[\033[00m\]:\[\033[01;34m\]\w\[\033[00m\]\$ '
else
PS1='${debian_chroot:+($debian_chroot)}\u@\h:\w\$ ' #将小写的w改为W
fi

添加local目录下的动态库

1
2
3
4
# 打开文件 末尾添加这一行
vim /etc/profile
export LD_LIBRARY_PATH=/usr/local/lib
sudo ldconfig