首页 > 代码库 > ubuntu问题解答集锦

ubuntu问题解答集锦

一、su root提示认证失败

  1. su root提示认证失败
  2. ubuntu root是默认禁用了,不答应用root登陆,所以先要设置root密码。   执行:sudo passwd root 接着输入密码和root密码,重复密码。再重新启动就可以用root登陆。
  3. sudo passwd 
    Password: <--- 输入安装时那个用户的密码 
    Enter new UNIX password: <--- 新的Root用户密码 
    Retype new UNIX password: <--- 重复新的Root用户密码 
    passwd:已成功更新密码

二、apt-get update失败原因

  1. 可能没配置网关vi /etc/resolv.conf    

            nameserver 119.29.29.29

            nameserver 182.254.116.116

 三、配置静态IP

  1. sudo vim /etc/network/interfaces

    修改如下部分:

    auto eth0
    iface eth0 inet static
    address 192.168.0.117
    gateway 192.168.0.1 #这个地址你要确认下 网关是不是这个地址
    netmask 255.255.255.0
    network 192.168.0.0
    broadcast 192.168.0.255

 

四、使用官网的源下载速度很慢,可以使用清华大学、阿里的源

    1.sudo vim /etc/apt/source.list

      

# deb cdrom:[Ubuntu 16.04 LTS _Xenial Xerus_ - Release amd64 (20160420.1)]/ xenial main restricteddeb-src http://archive.ubuntu.com/ubuntu xenial main restricted #Added by software-propertiesdeb http://mirrors.aliyun.com/ubuntu/ xenial main restricteddeb-src http://mirrors.aliyun.com/ubuntu/ xenial main restricted multiverse universe #Added by software-propertiesdeb http://mirrors.aliyun.com/ubuntu/ xenial-updates main restricteddeb-src http://mirrors.aliyun.com/ubuntu/ xenial-updates main restricted multiverse universe #Added by software-propertiesdeb http://mirrors.aliyun.com/ubuntu/ xenial universedeb http://mirrors.aliyun.com/ubuntu/ xenial-updates universedeb http://mirrors.aliyun.com/ubuntu/ xenial multiversedeb http://mirrors.aliyun.com/ubuntu/ xenial-updates multiversedeb http://mirrors.aliyun.com/ubuntu/ xenial-backports main restricted universe multiversedeb-src http://mirrors.aliyun.com/ubuntu/ xenial-backports main restricted universe multiverse #Added by software-propertiesdeb http://archive.canonical.com/ubuntu xenial partnerdeb-src http://archive.canonical.com/ubuntu xenial partnerdeb http://mirrors.aliyun.com/ubuntu/ xenial-security main restricteddeb-src http://mirrors.aliyun.com/ubuntu/ xenial-security main restricted multiverse universe #Added by software-propertiesdeb http://mirrors.aliyun.com/ubuntu/ xenial-security universedeb http://mirrors.aliyun.com/ubuntu/ xenial-security multiverse

 

ubuntu问题解答集锦