ubuntu输入密码界面系统键盘鼠标失灵

参考文档:

https://blog.csdn.net/qq_33302004/article/details/115184247

https://blog.csdn.net/weixin_45368686/article/details/105585732

https://blog.csdn.net/To_be_little/article/details/124509655

问题描述

重启ubuntu系统的时候,发现键盘和鼠标在刚启动的时候,还是正常的,在选择启动项之后,进入输入密码的界面的时候,直接失灵,重启多次无果,最后看大神说是损坏了 xserver-xorg-input-all,导致输入设备失灵,所以重新安装这个包即可。

解决方法

  1. 重启电脑-选择ubuntu的高级选项
  2. 选择带有 recovery mode 字样的选项
  3. 保证network一项是 enable的
  4. 然后选中 Drop to root shell prompte 进入

在出现的终端中输入如下两句指令:

mount -o rw,remount /
sudo apt-get install xserver-xorg-input-all

如果一切正常的话,没有提示网络或者其他下载问题的话,就你所需要键盘和鼠标的一些安装包成功重新下载安装了。输入下面的命令重启即可:

reboot

容易出现的问题

下载不成功

如果在下载过程中出现无法获取安装包的问题,可能是网络没有连接上。

在终端当中输入下面的命令查看现在的当前的网络链接情况:(网络前面有 * 代表已经连接上了)

nmcli dev wifi

如果没有连接上,可以手动连接无线网,命令如下:

nmcli dev wifi connect essid <网络名称> password <密码>

连接好后,可以用下面的命令来检查是否连接上:

iwconfig

出现网络地址,和接入点等信息,代表已经连接入网了。

确认连接上后,最后再使用

sudo apt-get install xserver-xorg-input-all

提醒 NetworkManager is not running

如果你的网卡是一切正常的话,可能还没有启动你的网卡。 可以使用下面的命令来启动你的网卡(前提是,在前面流程图中确定的network 状态是 enable 的):

systemctl start NetworkManager

如何再次尝试查询 WiFi 和 连接 WiFi 的命令即可,

nmcli dev wifi

Linux命令连接wifi

命令连接手机热点

参考文档: https://www.makeuseof.com/connect-to-wifi-with-nmcli/

Ubuntu系统进入登录界面后,键盘鼠标失效。需要重新安装xserver-xorg-input-all解决。

公司网络需要权限验证,引起通过通过电脑连接手机热点。

电脑的wifi连接被distable状态,下面介绍如何连接手机热点。

检查wifi是否开启

使用命令: nmcli dev status

nmcli dev status
DEVICE     TYPE      STATE        CONNECTION   
docker0    bridge    connected    docker0    
enp0s31f6  ethernet  connected    Wired connection 1 
wlp3s0     wifi      unavailable  --         
lo         loopback  unmanaged    --

nmcli radio wifi

nmcli radio wifi
disabled

输出disable说明wifi未开启。

开启wifi

使用命令: nmcli radio wifi on

sudo nmcli radio wifi on
nmcli radio wifi
enabled

注意:使用sudo,否则wifi开启会失败。

查找热点

首先确保手机热点已经开启。

使用命令: nmcli dev wifi list,查看热点。

nmcli dev wifi list
*  SSID                             MODE   CHAN  RATE       SIGNAL  BARS  SECURITY  
   wl                               Infra  11    54 Mbit/s  100     ▂▄▆█  WPA2

连接热点

使用命令: sudo nmcli dev wifi connect network-ssid password "network-password"

示例:

sudo nmcli dev wifi connect wl password "12345678"

输出:

sudo nmcli dev wifi connect wl password "12345678"
Device 'wlp3s0' successfully activated with '097398c2-e352-4203-aeb9-58d08a6bebda'.

如果报错: Error: No network with SSID 'wl' found.

可能是因为wifi设备开启时热点并未开启,需要重新启动wifi。

sudo nmcli radio wifi off
sudo nmcli radio wifi on

How to Connect to Wi-Fi Through the Linux Terminal With Nmcli

参考文档: https://www.makeuseof.com/connect-to-wifi-with-nmcli/

Connecting to Wi-Fi using the nmcli command is rather easy on Linux, with or without a graphical interface.

Need to connect to the internet on your Linux device, but don’t have an Ethernet port or access to graphical networking software? Here’s how to connect to Wi-Fi in the Linux terminal using the nmcli command.

What Is nmcli?

nmcli is the command-line interface for NetworkManager, a common Linux application for identifying and configuring internet connections. Many distributions have a graphical applet for using NetworkManager in a desktop environment, but you might not have access to a desktop if you’re on a Linux server.

Some methods of connecting with Wi-Fi through the terminal are a bit complicated, involving configuration files and knowing your PSK key.\

Not so with nmcli. Assuming you have a modern router, all you need to know is your network’s SSID (the name of the network you want to connect to) and the network password, if it has one.

Step 1: Enable Your Wi-Fi Device

The Wi-Fi card on your Linux PC can’t connect to the internet unless it’s enabled. To see the status of all your network interfaces, use this command:

nmcli dev status

示例:

nmcli dev status
DEVICE     TYPE      STATE        CONNECTION     
docker0    bridge    connected    docker0        
enp0s31f6  ethernet  connected    Wired connection 1 
wlp3s0     wifi      unavailable  --             
lo         loopback  unmanaged    --   

You should get a list of your network devices along with their type, state, and network connection info.

If you’re not sure whether your Wi-Fi device is enabled or not, you can check with this command:

nmcli radio wifi

示例:

nmcli radio wifi
disabled

If the output shows that the Wi-Fi is disabled, you can enable it with the following command:

nmcli radio wifi on

示例:

sudo nmcli radio wifi on
nmcli radio wifi
enabled

注意:使用sudo,否则wifi开启会失败。

Step 2: Identify a Wi-Fi Access Point

If you don’t know the name of your Wi-Fi access point, otherwise known as the SSID, you can find it by scanning for nearby Wi-Fi networks.

nmcli dev wifi list

示例:

nmcli dev wifi list
*  SSID                             MODE   CHAN  RATE       SIGNAL  BARS  SECURITY  
   wl                               Infra  11    54 Mbit/s  100     ▂▄▆█  WPA2   

Note the name listed under SSID for the network you want to connect to. You’ll need it for the next step.

Step 3: Connect to Wi-Fi With nmcli

With Wi-Fi enabled and your SSID identified, you’re now ready to connect. You can establish a connection with the following command:

sudo nmcli dev wifi connect network-ssid

Replace network-ssid with the name of your network. If you have WEP or WPA security on your Wi-Fi, you can specify the network password in the command as well.

sudo nmcli dev wifi connect network-ssid password "network-password"

Alternatively, if you don’t want to write out your password onscreen, you can use the –ask option:

sudo nmcli --ask dev wifi connect network-ssid

The system will now ask you to enter your network password without making it visible.

Your device should now be connected to the internet. Test it with a ping:

ping google.com

NetworkManager will save the connection and auto-connect on reboot, so you don’t have to worry about issuing the command every time you boot your Linux machine.

Managing Network Connections on Linux With nmcli

You can view all the saved connections by issuing the following command:

nmcli con show

示例:

nmcli con show
NAME                             UUID                                  TYPE             DEVICE  
Xxx-Office                       927e77e4-1067-48b0-af97-033a8a9aa67d  802-11-wireless  wlp3s0  
docker0                          3c2c3a72-3c79-40d5-a206-15c8e2c19de8  bridge           docker0    
wl                               00516376-9294-4eef-b61e-29db799471de  802-11-wireless  --  

If you’re connected to one network, but want to use a different connection, you can disconnect by switching the connection to down. You’ll need to specify the SSID, or if you have multiple connections with the same SSID, use the UUID.

nmcli con down ssid/uuid

To connect to another saved connection, simply pass the up option in the nmcli command. Make sure that you specify the SSID or UUID of the new network that you want to connect to.

nmcli con up ssid/uuid

Connecting to Wi-Fi Without a GUI on Linux

You’ve now connected to your Wi-Fi network without using a graphical interface, making you a much more versatile Linux user.

If you need to move files wirelessly, there are many Linux applications that allow for that, with or without a desktop environment.