Ask Your Question

How to change regulatory domain for network manager?

asked 2016-05-24 06:58:56 -0500

matinlotfali gravatar image

updated 2016-05-24 12:56:15 -0500

florian gravatar image

I want to run this command at Fedora 23 startup.

iw reg set US

I've put it in /etc/rc.d/rc.local but it starts after the network manager.

How can I run it before that?

edit retag flag offensive close merge delete



You could create a script and run it as systemd service that will run before Network Manager.

aeperezt gravatar imageaeperezt ( 2016-05-24 10:16:10 -0500 )edit

please guide me how to write a script and how to run it as systemd service. So I will mark it as answer.

matinlotfali gravatar imagematinlotfali ( 2016-05-24 11:47:42 -0500 )edit

2 Answers

Sort by ยป oldest newest most voted

answered 2016-05-24 12:42:39 -0500

aeperezt gravatar image

You will need to write a script name something like and add it on the /usr/loca/sbin you script should be something like:

/usr/sbin/iw reg set US

You need to set is as executable to do so:

chmod 777 /usr/local/sbin/

The you should write a systemd init file

Description=Set iw settings

ExecStart= /usr/loca/sbin/


This file should be placed on /etc/systemd/system/ named something iw-set.service and with 664 permits so

chmod 664 /etc/systemd/system/iw-set.service

Then you can test ti by issueing

systemctl daemon-reload
systemctl start iw-set.service

if all goes well you could enable at boot with

systemctl enable iw-set.service

While I have not tested, will recommend you to read systemd documentation and google a bit.

All that been said, I think it should be a way to set those parameters on NetworkManager it self, but not sure. Try google.

edit flag offensive delete link more


Network Manager uses wpa_supplicant. So, it can be done using wpa_supplicant.conf. An implementation in the graphical interface of NetworkManager is still missing...

florian gravatar imageflorian ( 2016-05-24 12:53:09 -0500 )edit

Good to know.

aeperezt gravatar imageaeperezt ( 2016-05-24 16:42:36 -0500 )edit

answered 2016-05-24 12:23:10 -0500

florian gravatar image

updated 2016-05-24 12:24:54 -0500

Why don't you use wpa_supplicant to change your regulatory domain?



to /etc/wpa_supplicant/wpa_supplicant.conf

edit flag offensive delete link more


This is the correct answer.

aeperezt gravatar imageaeperezt ( 2016-05-24 12:50:12 -0500 )edit

Did not work.

matinlotfali gravatar imagematinlotfali ( 2016-05-25 05:16:13 -0500 )edit

dmesg | grep cfg80211 returns what when using (only) the method described here? (You would need to temporarily disable iw-set.service and reboot).

florian gravatar imageflorian ( 2016-05-25 09:55:06 -0500 )edit

Question Tools



Asked: 2016-05-24 06:58:56 -0500

Seen: 1,024 times

Last updated: May 24 '16