How to know if your Linux machine is on 5GHz WiFi and what channel

Fri Dec 09 2022 00:00:00 GMT+0000 (Coordinated Universal Time)

In a terminal, just issue:


And for one network interface you will get something like this, where "5.18GHz" indicates you're on the higher band:

wlp1s0    IEEE 802.11  ESSID:"My dual band WiFi"  
      Mode:Managed  Frequency:5.18 GHz  Access Point: FF:FF:FF:FF:FF:FF   
      Bit Rate=6 Mb/s   Tx-Power=20 dBm   
      Retry short limit:7   RTS thr:off   Fragment thr:off
      Power Management:on
      Link Quality=51/70  Signal level=-59 dBm  
      Rx invalid nwid:0  Rx invalid crypt:0  Rx invalid frag:0
      Tx excessive retries:0  Invalid misc:0   Missed beacon:0

If you want to know what channel you're on you can install the iw command e.g. with apt on Ubuntu and get something like this:

Interface wlp1s0
    ifindex 3
    wdev 0x1
    addr ff:ff:ff:ff:ff:ff
    type managed
    wiphy 0
    channel 36 (5180 MHz), width: 80 MHz, center1: 5210 MHz
    txpower 20.00 dBm
    multicast TXQ:
        qsz-byt    qsz-pkt    flows    drops    marks    overlmt    hashcol    tx-bytes    tx-packets
        0    0    0    0    0    0    0    0        0

which indicates channel 36 in this case. But I guess that was probably obvious from the frequency anyway in the previous query?