更改pip源为国内阿里源

pip默认源为国外,so提高下载速度更换国内阿里源,及apt源、定制bash命令行提示符,废话不多直进主题

1. 创建配置文件

1
mkdir ~/.pip/ && cd ~/.pip/; vim pip.conf

2. 添加阿里源

添加如下内容

1
2
3
4
5
[global]
index-url = http://mirrors.aliyun.com/pypi/simple/
[install]
trusted-host=mirrors.aliyun.com

3. 测试

1
2
3
4
5
6
7
8
9
10
11
[email protected][12:13].pip:# pip install --upgrade pip
You are using pip version 7.1.0, however version 9.0.1 is available.
You should consider upgrading via the 'pip install --upgrade pip' command.
Collecting pip
Downloading http://mirrors.aliyun.com/pypi/packages/b6/ac/7015eb97dc749283ffdec1c3a88ddb8ae03b8fad0f0e611408f196358da3/pip-9.0.1-py2.py3-none-any.whl (1.3MB)
100% |████████████████████████████████| 1.3MB 5.0MB/s
Installing collected packages: pip
Found existing installation: pip 7.1.0
Uninstalling pip-7.1.0:
Successfully uninstalled pip-7.1.0
Successfully installed pip-9.0.1

附上kali rolling清华大学apt镜像源

deb http://mirrors.tuna.tsinghua.edu.cn/kali kali-rolling main non-free contrib

定制bash命令行提示符

1
2
3
echo "PS1='\[\e[31m\]\[email protected]\h\[\e[m\][\A]\[\e[34m\]\W:\[\e[34m\]\$\[\e[m\] '" >> ~/.bashrc && source ~/.bashrc