[Solved]iw Command Permanent

Questions about WIFI networks and devices
Forum rules
Before you post please read how to get help
Post Reply
User avatar
JayBird707
Level 3
Level 3
Posts: 112
Joined: Sat Jan 30, 2016 9:56 pm

[Solved]iw Command Permanent

Post by JayBird707 » Thu Aug 30, 2018 5:12 pm

I need to use wowaln with a NUC I'm setting up for my terrific wife. I need to execute the following command to get everything to work.

Code: Select all

sudo iw phy0 wowlan enable
The setting is not persistent and if the unit reboots for some reason I don't want her to know the sudo password.
Can someone tell me how to make the command persistent.
Thanks!
Last edited by JayBird707 on Sat Sep 01, 2018 11:55 am, edited 1 time in total.
Dell Studio 1737 Laptop: HP6300 SFF Desktop: HP8000 USFF Desktop: Intel NUC NUC7CJYH Mini All on Linux Mint!
Image

User avatar
xenopeek
Level 24
Level 24
Posts: 24101
Joined: Wed Jul 06, 2011 3:58 am
Location: The Netherlands

Re: iw Command Permanent

Post by xenopeek » Thu Aug 30, 2018 5:29 pm

You could try adding the line iw phy0 wowlan enable to the end of the file /etc/rc.local. That would run the command before login, so once the login screen is up (typically when network is also available).

If you don't have a file /etc/rc.local then create it, set execute permission on it and edit it to add the above line to it. If you're unsure just do the following to ensure the file exists and is executable before opening the editor (showing the blank new file or contents of previously existing file) so you can add the above line to the end of it.

Code: Select all

sudo touch /etc/rc.local
sudo chmod +x /etc/rc.local
xed admin:///etc/rc.local
(If you're using a version older than Linux Mint 19, replace the last command with gksudo xed /etc/rc.local or for very old versions with gksudo pluma /etc/rc.local)
Image

User avatar
JayBird707
Level 3
Level 3
Posts: 112
Joined: Sat Jan 30, 2016 9:56 pm

Re: iw Command Permanent

Post by JayBird707 » Fri Aug 31, 2018 7:31 pm

It will not work on a boot. If I run it from the terminal sudo /etc/rc.local it works. I put a sleep 10 as the first command and that did not help.
Dell Studio 1737 Laptop: HP6300 SFF Desktop: HP8000 USFF Desktop: Intel NUC NUC7CJYH Mini All on Linux Mint!
Image

User avatar
JayBird707
Level 3
Level 3
Posts: 112
Joined: Sat Jan 30, 2016 9:56 pm

Re: iw Command Permanent

Post by JayBird707 » Sat Sep 01, 2018 11:37 am

Xenopeek,
I am so sorry. Your solution of using rc.local works. I am too embarrassed to even tell you why I had some issues. Thank you for your help.
Jeff
Dell Studio 1737 Laptop: HP6300 SFF Desktop: HP8000 USFF Desktop: Intel NUC NUC7CJYH Mini All on Linux Mint!
Image

User avatar
xenopeek
Level 24
Level 24
Posts: 24101
Joined: Wed Jul 06, 2011 3:58 am
Location: The Netherlands

Re: [Solved]iw Command Permanent

Post by xenopeek » Sat Sep 01, 2018 12:18 pm

No problem. Glad it did the trick!
Image

Post Reply

Return to “Wireless”