我刚刚在我的计算机上安装了 Ubuntu 14.04 服务器,该服务器同时具有有线网络端口和 wifi 卡。我希望服务器在不可用时使用有线网络,并在不可用时使用 wifi。
原始的 /etc/network/interfaces 如下所示:
# This file describes the network interfaces available on your system
# and how to activate them. For more information, see interfaces(5).
# The loopback network interface
auto lo
iface lo inet loopback
# The primary network interface
auto p4p1
iface p4p1 inet dhcp
Run Code Online (Sandbox Code Playgroud)
我关注了这篇文章并将我的文件修改为:
# This file describes the network interfaces available on your system
# and how to activate them. For more information, see interfaces(5).
# …Run Code Online (Sandbox Code Playgroud) 首先,我对使用 linux 真的很陌生,因此,如果可能,请在您的回复中进行描述。我真的很想学习,但没有关于这个主题的大量知识库。对不起,如果我错过了提供一些信息,我应该能够获得体面的反馈,我真的很努力^_^
硬件:PCI无线网卡:
00:08.0 网络控制器 [0280]:Ralink corp. RT2500 无线 802.11bg [1814:0201] 修订版 01
我正在尝试为 git/atlassian/DLNA 流媒体/torrenting/... 使用设置一个家庭服务器,并想使用 Ubuntu 14.04 服务器。我已经安装了服务器,目前正在尝试将它连接到我的无线网络,这是我尝试的第一件事,但我已经失败了。
我尝试的第一件事是检查我是否真的能找到我的无线网络:
须藤 iwlist wlan0 扫描
wlan0 No scan results
Run Code Online (Sandbox Code Playgroud)
然后我尝试配置我的网络文件,并根据我从 Windows 笔记本电脑无线配置中获得的信息(仅包含必要的内容):
Standaardgateway. . . . . . . . . : fe80::5e35:3bff:fe20:930a%11
192.168.0.1
DHCP-server . . . . . . . . . . . : 192.168.0.1
DNS-servers . . . . . . . . . . . : 2a02:1800:100::42:2
2a02:1800:100::42:1
195.130.131.130
195.130.130.2
Zoeklijst voor verbindingsspec. DNS-achtervoegsels …Run Code Online (Sandbox Code Playgroud) 有没有可以使用 ncurses 管理无线网络连接的软件?
所以我刚刚安装了 Ubuntu Server 17.04,尝试通过无线连接,但iwconfig没有安装,所以我安装wireless-tools,通过 USB 驱动器复制 .deb,然后运行dpkg -i,但显然它需要libiw30,通过 USB 驱动器再次下载并复制,然后就安装成功了。
所以现在我可以通过运行以下命令通过我的 Android 手机连接到互联网而无需加密
ifconfig wlp4s0 down
dhclient -r wlp4s0
iwconfig wlp4s0 essid android_tether
iwconfig wlp4s0 mode Managed
ifconfig wlp4s0 up
dhclient wlp4s0
Run Code Online (Sandbox Code Playgroud)
现在我有互联网连接,但仍然无法连接到我办公室的 WPA2 接入点(速度快 10 倍:n/ac)。有没有任何 ncurses UI 方式可以连接到 WPA2?
因为我已经尝试过/etc/network/interfaces
auto wlp4s0
iface wlp4s0 inet dhcp
#wpa-ssid office_net
#wpa-psk office_net_password
wireless-essid office_net
wireless-psk office_net_password
Run Code Online (Sandbox Code Playgroud)
它总是使启动过程卡住(超时),无法获取IP地址,我必须每次重新启动到恢复模式才能更改它。
我安装了一个全新的 Ubuntu 16.04 服务器,但无法使用 WIFI。我的/etc/network/interfaces文件看起来像这样:
auto lo
iface lo inet loopback
auto wlan0
iface wlan0 inet dhcp
wpa-ssid lomboboo
wpa-psk password
Run Code Online (Sandbox Code Playgroud)
我也尝试了这个设置,因为它在这个答案中建议:
auto lo
iface lo inet loopback
auto wlan0
iface wlan0 inet static
address 192.168.1.150
netmask 255.255.255.0
gateway 192.168.1.1
wpa-ssid lomboboo
wpa-psk password
dns-nameservers 8.8.8.8 192.168.1.1
Run Code Online (Sandbox Code Playgroud)
但它们都不起作用。
PS不知道这是否重要 - Ubuntu 16.04 服务器在 Raspberry Pi 3 上运行。
编辑
sudo ifdown wlan0 && sudo ifup -v wlan0输出:

ping -c3 8.8.8.8 输出: …
我已经在计算机上安装了 Ubuntu 服务器版。在安装过程中我跳过了网络配置,现在我不知道如何通过局域网/以太网连接到互联网。