ubuntu 16.04 使用 (1) - 换源 翻墙 权限 引导

来源:互联网 发布:深入java 虚拟机 编辑:程序博客网 时间:2024/05/05 14:54

使用硬盘安装ubunt之后,如果windows下双系统会覆盖系统引导,可以在ubuntu终端下恢复

1.sudo update-grub2

设置root用户

2.sudo passwd root (设置root密码)

获得root最高权限(暂时)

3.su - root



换源

4.sudo gedit /etc/apt/sources.list (使用阿里云的源,似乎其他的源找不到python需要的依赖)

deb http://mirrors.aliyun.com/ubuntu/ xenial main restricted universe multiversedeb http://mirrors.aliyun.com/ubuntu/ xenial-security main restricted universe multiversedeb http://mirrors.aliyun.com/ubuntu/ xenial-updates main restricted universe multiversedeb http://mirrors.aliyun.com/ubuntu/ xenial-backports main restricted universe multiverse##测试版源deb http://mirrors.aliyun.com/ubuntu/ xenial-proposed main restricted universe multiverse# 源码deb-src http://mirrors.aliyun.com/ubuntu/ xenial main restricted universe multiversedeb-src http://mirrors.aliyun.com/ubuntu/ xenial-security main restricted universe multiversedeb-src http://mirrors.aliyun.com/ubuntu/ xenial-updates main restricted universe multiversedeb-src http://mirrors.aliyun.com/ubuntu/ xenial-backports main restricted universe multiverse##测试版源deb-src http://mirrors.aliyun.com/ubuntu/ xenial-proposed main restricted universe multiverse# Canonical 合作伙伴和附加deb http://archive.canonical.com/ubuntu/ xenial partnerdeb http://extras.ubuntu.com/ubuntu/ xenial main

5.sudo apt-get update

6.sudo apt-get install


翻墙shadowsocks

7.sudo apt-get install python-gevent python-pip

8.sudo pip install shadowsocks

创建配置文件ss.json(http://www.ishadowsocks.org/)

{    "server":"us2.iss.tf",    "server_port":8989,    "local_address": "127.0.0.1",    "local_port":1080,    "password":"18218719",    "timeout":300,    "method":"aes-256-cfb"}
启用ss

9.sslocal -c ss.json

启动成功ss之后,如果想要google浏览器代理,可以在系统设置全局代理,也可以使用google代理插件

如果想在终端绑定代理,设置如下:

10.export http_proxy="127.0.0.1:1080"

11.wget http://www.google.com 如果收到index.html则终端代理成功!



0 0