Ubantu16.04踩坑小记(没有wifi,无法apt update)

来源:互联网 发布:淘宝是p2p 编辑:程序博客网 时间:2024/06/07 03:45

1.装机后,无法连接wifi.

因为ubantu系统没有识别到无线网卡,需要在“设置”——“附加驱动”中 勾选Broadcom。

微信图片_20170927110623.jpg

无法连接wifi.因为ubantu系统没有识别到无线网卡,需要在“设置”——“附加驱动”中 勾选Broadcom。

如果还不行,尝试禁用secure boot

Ubuntu 16.04 禁用 Secure boot 问题

我的密码是装系统的时候设置的,该密码并不是每次开机的要输入的密码。

2.apt-get update 无法执行

E: Problem executing scripts APT::Update::Post-Invoke-Success'if /usr/bin/test -w /var/cache/app-info -a -e /usr/bin/appstreamcli; then appstreamcli refresh > /dev/null; fi'E: Sub-process returned an error code

在运行sudo apt-get update时出现如上信息,解决方法如下:

sudo pkill -KILL appstreamcliwget -P /tmp https://launchpad.net/ubuntu/+archive/primary/+files/appstream_0.9.4-1ubuntu1_amd64.deb https://launchpad.net/ubuntu/+archive/primary/+files/libappstream3_0.9.4-1ubuntu1_amd64.debsudo dpkg -i /tmp/appstream_0.9.4-1ubuntu1_amd64.deb /tmp/libappstream3_0.9.4-1ubuntu1_amd64.deb

执行完上述命令之后再次运行sudo apt-get update就不会再出现上面的错误。

特别注意这一步需要翻墙

[Ubuntu 16.04出现:Problem executing scripts APT::Update::Post-Invoke-Success ‘if /usr/bin/test -w /var/cache/app-info -a -e /usr/bin/appstreamcli; then appstreamcli refresh > /dev/null; fi’](http://www.cnblogs.com/EasonJim/p/7343892.html)

安装ssh

判断是否安装ssh服务,可以通过如下命令进行:

ps -e|grep ssh

ssh-agent表示ssh-client启动,sshd表示ssh-server启动了。

 输出如下:root@tracyliu:~$ ps -e|grep ssh 2151 ?        00:00:00 ssh-agent 5313 ?        00:00:00 sshd

如果缺少sshd,说明ssh服务没有启动或者没有安装。

安装ssh-client命令:

sudo apt-get install openssh-client

安装ssh-server命令:

sudo apt-get install openssh-server

安装完成以后,先启动服务:

sudo /etc/init.d/ssh start

启动后,可以通过“ps -e|grep ssh”查看是否正确启动。

ssh服务默认的端口是22,可以更改端口,使用如下命令打开ssh配置文件:

sudo gedit /etc/ssh/sshd_config

配置文件内容如下:

# Package generated configuration file   # See the sshd(8) manpage for details   # What ports, IPs and protocols we listen for  Port 22# Package generated configuration file# See the sshd(8) manpage for details# What ports, IPs and protocols we listen for

修改端口号(Port)后,重启ssh服务即可生效,命令如下:

sudo /etc/init.d/ssh restart

ssh服务启动后,即可登陆,登陆命令格式为:ssh 帐号@IP地址
例如:ssh test@192.168.135.249
根据提示输入test的密码,即可远程登陆。

4.安装samba

Ubuntu下配置Samba服务器
[ubuntu下samba服务器配置](http://blog.csdn.net/u011091632/article/details/21887385)

阅读全文
0 0
原创粉丝点击