#!/bin/bash # # 2020 → 2025 - j1v3d4v0m17 # # v0.1 # # Creative Commons Attribution-NonCommercial-ShareAlike 4.0 # International Public License # https://spdx.org/licenses/CC-BY-NC-SA-4.0.html # # Wifichek script by cracolinux suitable for Ubuntu 20.04 # # Author: Jeremy VINCENT # 5, place Camille Pelletan, 33000 Bordeaux, France # # ubuntu version is_ubuntu20() { [[ $(lsb_release -rs) =~ "Ubuntu 20" ]] return $? } exec 3>&1 exec 1>~/wificheck.log echo [code] # cat /etc/lsb-release echo -e "\n>> cat /etc/lsb-release \n" cat /etc/lsb-release -a # lsusb echo -e "\n>> lsusb \n" lsusb # lspci -k -nn | grep -A 3 -i net echo -e "\n>> lspci -k -nn | grep -A 3 -i net \n" lspci -k -nn | grep -A 3 -i net # sudo lshw -C network echo -e "\n>> sudo lshw -C network \n" sudo lshw -C network # lsmod echo -e "\n>> lsmod | sort \n" lsmod | sort echo [/code] echo [code] # iwconfig echo -e "\n>> iwconfig \n" iwconfig # ip a or ifconfig -a if is_ubuntu20; then echo -e "\n>> ip a \n" ip a else echo -e "\n>> ifconfig -a \n" ifconfig -a fi # sudo iwlist scan echo -e "\n>> sudo iwlist scan \n" sudo iwlist scan # uname -r -m echo -e "\n>> uname -r -m \n" uname -r -m # cat /etc/network/interfaces echo -e "\n>> cat /etc/network/interfaces \n" cat /etc/network/interfaces # nm-tool or nmcli if is_ubuntu20; then echo -e "\n>> nmcli device show \n" nmcli device show else echo -e "\n>> nm-tool \n" nm-tool echo -e "\n>> nmcli connection status \n" nmcli c status fi # nmcli dev wifi echo -e "\n>> nmcli dev wifi \n" nmcli dev wifi # nmcli connection echo -e "\n>> nmcli connection list (< 15.04) ou nmcli connection show (>= 15.04) \n" nmcli c show 2>/dev/null || nmcli c list # sudo rfkill list echo -e "\n>> sudo rfkill list \n" sudo rfkill list echo [/code] exec >&3- echo "Le fichier wificheck.log a été crée dans votre répertoire $HOME" echo "Vous n'avez plus qu'à l'éditer et à copier/coller son contenu sur le forum"