發生原因:如果 windows 中 wifi 可用,但在 Ubuntu 下不可用,那麼及有可能是無線網卡的驅動程式損壞或是消失。因此我們接下來要手動將驅動程式安裝回來。
首先,打開 terminal 使用命令查詢網卡的狀態
$ lshw -C network
得到類似的訊息如下:
*-network UNCLAIMED
description: Wireless interface
product: Wi-Fi 6 AX201
vendor: Intel Corporation
physical id: 14.3
bus info: pci@0000:00:14.3
logical name: wlo1
version: 00
serial: 8c:c6:81:92:f2:7f
width: 64 bits
clock: 33MHz
capabilities: bus_master cap_list ethernet physical wireless
configuration: broadcast=yes driver=iwlwifi driverversion=5.8.0-44-generic firmware=55.d9698065.0 QuZ-a0-hr-b0-55.u ip=192.168.0.3 latency=0 link=yes multicast=yes wireless=IEEE 802.11
resources: irq:16 memory:c4414000-c4417fff
*-network
description: Ethernet interface
product: RTL8111/8168/8411 PCI Express Gigabit Ethernet Controller
vendor: Realtek Semiconductor Co., Ltd.
physical id: 0
bus info: pci@0000:03:00.0
logical name: enp3s0
version: 15
serial: 2c:f0:5d:65:e1:99
capacity: 1Gbit/s
width: 64 bits
clock: 33MHz
capabilities: bus_master cap_list ethernet physical tp mii 10bt 10bt-fd 100bt 100bt-fd 1000bt-fd autonegotiation
configuration: autonegotiation=on broadcast=yes driver=r8169 driverversion=5.8.0-44-generic firmware=rtl8168h-2_0.0.2 02/26/15 latency=0 link=no multicast=yes port=MII
resources: irq:19 ioport:3000(size=256) memory:c4204000-c4204fff memory:c4200000-c4203fff
上半部就是無線網路,下半部則是乙太網路。我們可以發現無線網被 UNCLAIMED,而且軟體更新附加驅動中也找不到相應的驅動,那麽我們需要手動下載本電腦無線網卡的驅動然後安裝。
第一步驟:
查詢我們電腦的無線網卡型號
$ lspci |grep -i net
或是
$ iwconfig
範例的結果如下所示:
00:14.3 Network controller: Intel Corporation Wi-Fi 6 AX201
03:00.0 Ethernet controller: Realtek Semiconductor Co., Ltd. RTL8111/8168/8411 PCI Express Gigabit Ethernet Controller (rev 15)
我們就可以知道無線網卡的型號為 Intel Corporation Wi-Fi 6 AX201。
第二步驟:
找到無線網卡的型號後,上網搜尋該網卡之驅動程式,如無線網卡型號+Ubuntu。在 Intel 的網站上也能找到許多網卡相對應的驅動程式。找到之後下載下來解壓縮,接著使用以下的命令將目錄複製到 /lib/firmware:
$ sudo cp -r iwlwifi-3168-22.ucode(來源目錄) /lib/firmware(目的目錄)
第三步驟:
更新一下grub,然後重啟即可。
$ sudo update-grub
$ sudo reboot
報稅懶人包
Jul 1, 2024contributed by < JimmyLiu0530 > {%hackmd BJrTq20hE %} 課程錄影 (Fall 2015) 課程錄影(中英字幕) 課程介紹 (Spring 2021) 概述 CS:APP 在一開始利用所有新手程式員學的第一支程式,即在螢幕上輸出 hello world,來展示程式從被產出、執行、結束的過程,也幾乎都有點到了各章節的重點,因此接下來內容的範例幾乎都是以 hello.c 為主。
Mar 11, 2022{%hackmd BJrTq20hE %} 最簡單方便的除錯工具不外乎是列印指令 (e.g., printf),但是設想下以下的情況: 某個迴圈可能在第一百萬零七十三次才出錯,這當中印出來的 debug 資料可能多到令人頭昏。因此我們需要一個工具,讓我們可以一邊執行你的程式, 一邊視需要將它停下來觀察當中某些變數的變化。如果發現問題不在此處,還可以叫它繼續執行。執行到一半,還可以手動修改變數的值,看看如果這個問題解決了,下個又在何處,一口氣解決好幾個問題。這些就是 debugger 的工作。 GDB 一種命令列模式的 debugger。若以下列語言撰寫程式 C, objective C, C++, Fortran, Pascal, Ada, ... 等等,而且採用的編譯器是來自 gnu,那麼就可以拿 GDB 來除錯。 使用方法 (以 c 程式舉例) 首先在編譯程式時,需要加上 -g 參數,以便編譯器將除錯資訊加入到程式裡:
Mar 11, 2022{%hackmd BJrTq20hE %} Garbage collection on wiki Project proposal slides (link) Project presentation slides (link) Project Demo (link) Garbage Collector Basics Garbage collector: a dynamic storage allocator that automatically frees allocated blocks that are no longer needed by the program.
Mar 11, 2022or
By clicking below, you agree to our terms of service.
New to HackMD? Sign up