玩转 Ubuntu

来源:互联网 发布:服装淘宝店从哪里进货 编辑:程序博客网 时间:2024/06/05 06:38

玩转 Ubuntu

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

sudo adduser --group work samdylivi /etc/sudoers # 增加下面内容# add by samdyli no password operate all command%work ALL=(ALL) NOPASSWD:ALLsource /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 restricteddeb-src http://mirrors.ustc.edu.cn/ubuntu/ precise-updates main restricteddeb http://mirrors.ustc.edu.cn/ubuntu/ precise universedeb-src http://mirrors.ustc.edu.cn/ubuntu/ precise universedeb http://mirrors.ustc.edu.cn/ubuntu/ precise-updates universedeb-src http://mirrors.ustc.edu.cn/ubuntu/ precise-updates universedeb http://mirrors.ustc.edu.cn/ubuntu/ precise multiversedeb-src http://mirrors.ustc.edu.cn/ubuntu/ precise multiversedeb http://mirrors.ustc.edu.cn/ubuntu/ precise-updates multiversedeb-src http://mirrors.ustc.edu.cn/ubuntu/ precise-updates multiversedeb http://mirrors.ustc.edu.cn/ubuntu/ precise-backports main restricted universe multiversedeb-src http://mirrors.ustc.edu.cn/ubuntu/ precise-backports main restricted universe multiverse# 搜狐源:deb http://mirrors.sohu.com/ubuntu/ precise-updates main restricteddeb-src http://mirrors.sohu.com/ubuntu/ precise-updates main restricteddeb http://mirrors.sohu.com/ubuntu/ precise universedeb-src http://mirrors.sohu.com/ubuntu/ precise universedeb http://mirrors.sohu.com/ubuntu/ precise-updates universedeb-src http://mirrors.sohu.com/ubuntu/ precise-updates universedeb http://mirrors.sohu.com/ubuntu/ precise multiversedeb-src http://mirrors.sohu.com/ubuntu/ precise multiversedeb http://mirrors.sohu.com/ubuntu/ precise-updates multiversedeb-src http://mirrors.sohu.com/ubuntu/ precise-updates multiversedeb http://mirrors.sohu.com/ubuntu/ precise-backports main restricted universe multiversedeb-src http://mirrors.sohu.com/ubuntu/ precise-backports main restricted universe multiverse# 网易源:deb http://mirrors.163.com/ubuntu/ precise-updates main restricteddeb-src http://mirrors.163.com/ubuntu/ precise-updates main restricteddeb http://mirrors.163.com/ubuntu/ precise universedeb-src http://mirrors.163.com/ubuntu/ precise universedeb http://mirrors.163.com/ubuntu/ precise-updates universedeb-src http://mirrors.163.com/ubuntu/ precise-updates universedeb http://mirrors.163.com/ubuntu/ precise multiversedeb-src http://mirrors.163.com/ubuntu/ precise multiversedeb http://mirrors.163.com/ubuntu/ precise-updates multiversedeb-src http://mirrors.163.com/ubuntu/ precise-updates multiversedeb http://mirrors.163.com/ubuntu/ precise-backports main restricted universe multiversedeb-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的身份进入命令行。
0 0
原创粉丝点击