[Solved]iw Command Permanent

Questions about Wi-Fi and other network devices, file sharing, firewalls, connection sharing etc
Forum rules
Before you post read how to get help. Topics in this forum are automatically closed 6 months after creation.
Locked
User avatar
JayBird707
Level 3
Level 3
Posts: 126
Joined: Sat Jan 30, 2016 9:56 pm

[Solved]iw Command Permanent

Post by JayBird707 »

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 LockBot on Wed Dec 28, 2022 7:16 am, edited 2 times in total.
Reason: Topic automatically closed 6 months after creation. New replies are no longer allowed.
ASRock H470M-ITX/ac Home Build on Linux Mint Cinnamon!
Dell Studio 1737 Laptop, HP6300 SFF Desktop, Intel NUC NUC7CJYH Mini All on Linux Mint XFCE!
Image
User avatar
xenopeek
Level 25
Level 25
Posts: 29587
Joined: Wed Jul 06, 2011 3:58 am

Re: iw Command Permanent

Post by xenopeek »

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: 126
Joined: Sat Jan 30, 2016 9:56 pm

Re: iw Command Permanent

Post by JayBird707 »

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.
ASRock H470M-ITX/ac Home Build on Linux Mint Cinnamon!
Dell Studio 1737 Laptop, HP6300 SFF Desktop, Intel NUC NUC7CJYH Mini All on Linux Mint XFCE!
Image
User avatar
JayBird707
Level 3
Level 3
Posts: 126
Joined: Sat Jan 30, 2016 9:56 pm

Re: iw Command Permanent

Post by JayBird707 »

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
ASRock H470M-ITX/ac Home Build on Linux Mint Cinnamon!
Dell Studio 1737 Laptop, HP6300 SFF Desktop, Intel NUC NUC7CJYH Mini All on Linux Mint XFCE!
Image
User avatar
xenopeek
Level 25
Level 25
Posts: 29587
Joined: Wed Jul 06, 2011 3:58 am

Re: [Solved]iw Command Permanent

Post by xenopeek »

No problem. Glad it did the trick!
Image
Locked

Return to “Networking”