Ubuntu 配置

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

  1. sudo apt-get install miredo
  2. 以root权限打开ufw的配置文件: “/etc/default/ufw”,找到"IPV6=no"这一行,将其改为"IPV6=yes"。
  3. 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
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值