1.更改源
源备份
sudo cp /etc/apt/sources.list /etc/apt/sources.list.bak
源更改
sudo vim /etc/apt/sources.list
清华源地址: Go.
# 默认注释了源码镜像以提高 apt update 速度,如有需要可自行取消注释
deb https://mirrors6.tuna.tsinghua.edu.cn/ubuntu/ xenial main restricted universe multiverse
# deb-src https://mirrors6.tuna.tsinghua.edu.cn/ubuntu/ xenial main restricted universe multiverse
deb https://mirrors6.tuna.tsinghua.edu.cn/ubuntu/ xenial-updates main restricted universe multiverse
# deb-src https://mirrors6.tuna.tsinghua.edu.cn/ubuntu/ xenial-updates main restricted universe multiverse
deb https://mirrors6.tuna.tsinghua.edu.cn/ubuntu/ xenial-backports main restricted universe multiverse
# deb-src https://mirrors6.tuna.tsinghua.edu.cn/ubuntu/ xenial-backports main restricted universe multiverse
deb https://mirrors6.tuna.tsinghua.edu.cn/ubuntu/ xenial-security main restricted universe multiverse
# deb-src https://mirrors6.tuna.tsinghua.edu.cn/ubuntu/ xenial-security main restricted universe multiverse
2.使用ipv6
安装miredo
- sudo apt-get install miredo
- 以root权限打开ufw的配置文件: “/etc/default/ufw”,找到"IPV6=no"这一行,将其改为"IPV6=yes"。
- sudo invoke-rc.d networking restart
ubuntu16.04按照上述方案,ipv6地址出来了,但是仍不能访问ipv6网址。
- 原因
当前用的是校园网动态分配的ipv6地址,需要改成静态的。 - 方法
1.只需要改变/etc/sysctl.d/10-ipv6-privacy.conf文件,将net.ipv6.conf.default.use_tempaddr改为0
2.sudo sysctl --system #加载所有的配置文件
测试:
ping6 ipv6.baidu.com
3.安装SSH
1.查看ssh是否安装
sudo ps -e |grep ssh
2.安装ssh
sudo apt-get install openssh-server
4.tab不能补全
1:打开终端输入如下命令:
sudo vim /etc/bash.bashrc
2:将下面代码注释取消
# 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
3:重启ubuntu
sudo reboot