Change regulatory domain manually via command line

Can someone help me with the step-by-step on how to change WiFi regulatory domain manually via CLI?
I am a noob and wanted to learn everything instead of using the dietpi-config.

So far I have tried the following command and reboot but the Reg domain does not change:

echo 'REGDOMAIN=US' > /etc/default/crda
echo 'country=US' > /etc/wpa_supplicant/wpa_supplicant.conf 
echo 'AUTO_SETUP_NET_WIFI_COUNTRY_CODE=US' >> /boot/dietpi.txt
modprobe cfg80211
systemctl daemon-reload

Also the iw reg set US command does not seem to work either:

root@DietPi:~# iw reg set US
root@DietPi:~# iw reg get
global
country 00: DFS-UNSET
	(2402 - 2472 @ 40), (6, 20), (N/A)
	(2457 - 2482 @ 20), (6, 20), (N/A), AUTO-BW, PASSIVE-SCAN
	(2474 - 2494 @ 20), (6, 20), (N/A), NO-OFDM, PASSIVE-SCAN
	(5170 - 5250 @ 80), (6, 20), (N/A), AUTO-BW, PASSIVE-SCAN
	(5250 - 5330 @ 80), (6, 20), (0 ms), DFS, AUTO-BW, PASSIVE-SCAN
	(5490 - 5730 @ 160), (6, 20), (0 ms), DFS, PASSIVE-SCAN
	(5735 - 5835 @ 80), (6, 20), (N/A), PASSIVE-SCAN
	(57240 - 63720 @ 2160), (N/A, 0), (N/A)

root@DietPi:~#

I am running DietPi as a proxmox VM, linux kernel 6.5.0

did you tried changing country code within dietpi-config??

                                                         
              ●─ Basic Options ───────────────────────●  
  Scan        : Scan and configure SSID                  
              ●─ DHCP/STATIC IP ──────────────────────●  
  Change Mode : [DHCP]                                   
              ●─ Additional Options ──────────────────●  
  Country     : [GB]                                     
              ●─ Toggle State ────────────────────────●  
  Disable     : Disable WiFi adapter                     
              ●─ Apply ───────────────────────────────●  
  Apply       : Save all changes and restart networking  
                                                         
                                                         
    <Ok>                                      <Back>     
                                                         

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.