ubuntu问题解答集锦

Posted zipon

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了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 restricted
deb-src http://archive.ubuntu.com/ubuntu xenial main restricted #Added by software-properties
deb http://mirrors.aliyun.com/ubuntu/ xenial main restricted
deb-src http://mirrors.aliyun.com/ubuntu/ xenial main restricted multiverse universe #Added by software-properties
deb http://mirrors.aliyun.com/ubuntu/ xenial-updates main restricted
deb-src http://mirrors.aliyun.com/ubuntu/ xenial-updates main restricted multiverse universe #Added by software-properties
deb http://mirrors.aliyun.com/ubuntu/ xenial universe
deb http://mirrors.aliyun.com/ubuntu/ xenial-updates universe
deb http://mirrors.aliyun.com/ubuntu/ xenial multiverse
deb http://mirrors.aliyun.com/ubuntu/ xenial-updates multiverse
deb http://mirrors.aliyun.com/ubuntu/ xenial-backports main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ xenial-backports main restricted universe multiverse #Added by software-properties
deb http://archive.canonical.com/ubuntu xenial partner
deb-src http://archive.canonical.com/ubuntu xenial partner
deb http://mirrors.aliyun.com/ubuntu/ xenial-security main restricted
deb-src http://mirrors.aliyun.com/ubuntu/ xenial-security main restricted multiverse universe #Added by software-properties
deb http://mirrors.aliyun.com/ubuntu/ xenial-security universe
deb http://mirrors.aliyun.com/ubuntu/ xenial-security multiverse

 

以上是关于ubuntu问题解答集锦的主要内容,如果未能解决你的问题,请参考以下文章

ubuntu问题解答集锦

ubuntu常用工具集锦

ubuntu安装php常见错误集锦

Ubuntu 18.04.5 LTS AndroidStudio以及相关SDK/NDK/Tools踩坑集锦(持续更新)

ubuntu16.0 anaconda3 安装tensorflow keras错误集锦

markdown 在Intel Nuc上设置Ubuntu Web服务器,步骤和代码片段