玩转 Ubuntu

玩转 Ubuntu

ubuntu步骤:
1. 修改root密码sudo passwd root
2. 新建用户组,sudo addgroup work
3. 新建普通用户,并加入sudoers

sudo adduser --group work samdyli
vi /etc/sudoers 
# 增加下面内容
# add by samdyli no password operate all command
%work ALL=(ALL) NOPASSWD:ALL
source /etc/sudoers
  1. 更改源
    a. 备份源
cp /etc/apt/sources.list /etc/apt/sources.list.bak

b.更改源

# 中科大
deb http://mirrors.ustc.edu.cn/ubuntu/ precise-updates main restricted
deb-src http://mirrors.ustc.edu.cn/ubuntu/ precise-updates main restricted
deb http://mirrors.ustc.edu.cn/ubuntu/ precise universe
deb-src http://mirrors.ustc.edu.cn/ubuntu/ precise universe
deb http://mirrors.ustc.edu.cn/ubuntu/ precise-updates universe
deb-src http://mirrors.ustc.edu.cn/ubuntu/ precise-updates universe
deb http://mirrors.ustc.edu.cn/ubuntu/ precise multiverse
deb-src http://mirrors.ustc.edu.cn/ubuntu/ precise multiverse
deb http://mirrors.ustc.edu.cn/ubuntu/ precise-updates multiverse
deb-src http://mirrors.ustc.edu.cn/ubuntu/ precise-updates multiverse
deb http://mirrors.ustc.edu.cn/ubuntu/ precise-backports main restricted universe multiverse
deb-src http://mirrors.ustc.edu.cn/ubuntu/ precise-backports main restricted universe multiverse
# 搜狐源:
deb http://mirrors.sohu.com/ubuntu/ precise-updates main restricted
deb-src http://mirrors.sohu.com/ubuntu/ precise-updates main restricted
deb http://mirrors.sohu.com/ubuntu/ precise universe
deb-src http://mirrors.sohu.com/ubuntu/ precise universe
deb http://mirrors.sohu.com/ubuntu/ precise-updates universe
deb-src http://mirrors.sohu.com/ubuntu/ precise-updates universe
deb http://mirrors.sohu.com/ubuntu/ precise multiverse
deb-src http://mirrors.sohu.com/ubuntu/ precise multiverse
deb http://mirrors.sohu.com/ubuntu/ precise-updates multiverse
deb-src http://mirrors.sohu.com/ubuntu/ precise-updates multiverse
deb http://mirrors.sohu.com/ubuntu/ precise-backports main restricted universe multiverse
deb-src http://mirrors.sohu.com/ubuntu/ precise-backports main restricted universe multiverse
# 网易源:
deb http://mirrors.163.com/ubuntu/ precise-updates main restricted
deb-src http://mirrors.163.com/ubuntu/ precise-updates main restricted
deb http://mirrors.163.com/ubuntu/ precise universe
deb-src http://mirrors.163.com/ubuntu/ precise universe
deb http://mirrors.163.com/ubuntu/ precise-updates universe
deb-src http://mirrors.163.com/ubuntu/ precise-updates universe
deb http://mirrors.163.com/ubuntu/ precise multiverse
deb-src http://mirrors.163.com/ubuntu/ precise multiverse
deb http://mirrors.163.com/ubuntu/ precise-updates multiverse
deb-src http://mirrors.163.com/ubuntu/ precise-updates multiverse
deb http://mirrors.163.com/ubuntu/ precise-backports main restricted universe multiverse
deb-src http://mirrors.163.com/ubuntu/ precise-backports main restricted universe multiverse

c. 更新源
sudo apt-get update
4. 安装vim sudo apt-get install vim-gnome
5. 安装chrome
a. 如果你还没有安装Chrome:
wget -q -O - https://dl-ssl.google.com/linux/linux_signing_key.pub | sudo apt-key add -
(如果无法下载,请替换为http://mirror.b0.upaiyun.com/dl.google.com/linux/linux_signing_key.pub)
b. deb http://mirror.b0.upaiyun.com/dl.google.com/linux/chrome/deb/ stable main
c. 安装:sudo apt-get install
google-chrome-unstable google-chrome-beta google-chrome-stable google-chrome-unstable google-chrome-beta
d. 如果已经安装:请替换/etc/apt/sources.list.d/google.list(或类似名字)中
http://dl.google.com/linux/chrome/deb/为http://mirror.b0.upaiyun.com/dl.google.com/linux/chrome/deb/
6. 设置chrome代理或者pac
图形界面无法设置代理只能通过命令行去启动,设置代理请使用google-chrome --proxy-server="https://proxy.com/ss",设置pca请使用google-chrome -proxy-pca-url="http://sfsdf.com"也可以加入alias(“` alias google-chrome=google-chrome -proxy-pca-url=”http://sfsdf.com”

[问题]:

  1. 不小心弄坏/etc/sudoers文件,没有修改root密码。所有命令不能使用。
    解决方法:进入ubuntu的recovery模式,选择root,以root的身份进入命令行。

你可能感兴趣的:(未完成)