lk/networking/wifi.md

93 lines
1.5 KiB
Markdown
Raw Normal View History

2022-01-16 18:20:39 +00:00
---
title: "wifi"
2022-01-26 22:35:07 +00:00
tags: [ "Documentation", "Networking" ]
2022-01-16 18:20:39 +00:00
---
2020-01-02 00:04:35 +00:00
# Netstat Stuff
Stats on local net usage within domain.
2020-01-09 12:31:03 +00:00
```bash
iftop -p -n
```
2020-01-02 00:04:35 +00:00
```bash
whois domain.com
```
2020-01-02 00:04:35 +00:00
2020-01-05 12:33:53 +00:00
Info on domain, whether it's taken, et c.:
```bash
dig domain.com
```
2020-01-02 00:04:35 +00:00
```bash
ifconfig
```
2020-01-05 12:33:53 +00:00
Versatile wifi tool:
2020-01-02 00:04:35 +00:00
```bash
nmcli
```
2020-01-02 00:04:35 +00:00
# Examples
2020-01-05 12:33:53 +00:00
You want to connect to the internet.
```bash
sudo iwconfig
```
2020-01-02 00:04:35 +00:00
Get knowledge of wireless state. The output might be:
> wlp3s0 IEEE 802.11 ESSID:"Gandalf WajFaj"
2020-01-02 00:04:35 +00:00
> Mode:Managed Frequency:2.412 GHz Access Point: 10:05:01:90:AC:1A
2020-01-02 00:04:35 +00:00
> Bit Rate=144.4 Mb/s Tx-Power=15 dBm
2020-01-02 00:04:35 +00:00
> Retry short limit:7 RTS thr:off Fragment thr:off
2020-01-02 00:04:35 +00:00
> Encryption key:off
2020-01-02 00:04:35 +00:00
> Power Management:on
2020-01-02 00:04:35 +00:00
> Link Quality=64/70 Signal level=-46 dBm
2020-01-02 00:04:35 +00:00
> Rx invalid nwid:0 Rx invalid crypt:0 Rx invalid frag
2020-01-02 00:04:35 +00:00
> Tx excessive retries:0 Invalid misc:363 Missed beacon
2020-01-02 00:04:35 +00:00
This tells you that your ESSID is 'Gandalf WajFaj', and the access point name is 10:05:......
```bash
nmcli radio
```
2020-01-02 00:04:35 +00:00
2022-01-26 22:35:07 +00:00
You get an overview of your radio devices.
You're told that eth0 deals with your ethernet and `wlan0` deals with wifi.
`wlan0` is a file which represents your wifi device.
2020-01-02 00:04:35 +00:00
```bash
nmcli wlan0 wifi rescan
```
2020-01-02 00:04:35 +00:00
```bash
nmcli device wifi list
```
2020-01-02 00:04:35 +00:00
2022-01-26 22:35:07 +00:00
Now to connect.
2020-01-02 00:04:35 +00:00
```bash
nmcli device wifi connect [SSID] [your password] [wifi password]
```
2020-01-02 00:04:35 +00:00
2022-01-26 22:35:07 +00:00
Alternatively, you can use
2020-01-02 00:04:35 +00:00
```bash
nmcli -ask device wifi connect [SSID]
```
2020-01-05 12:33:53 +00:00
2022-01-26 22:35:07 +00:00
And it'll ask for your password, so you're not typing it in in full view.
2020-01-02 00:04:35 +00:00