I'm looking to set a schedule to block my computer's access to WiFi from midnight to 6 AM. The goal is to help me resist the temptation to stay up late working or browsing the internet. I've tried using parental controls, but that requires me to create a different user account, which seems unnecessary since I could easily access my main account anyway. I already have similar functionality set up on my phone with app limits and website blockers, but I struggle to find a way to implement this on my Linux system. I'm using the latest version of Ubuntu and would really appreciate any help!
1 Answer
You could try using `crontab -e` to set up a couple of cron jobs that'll disable and enable your WiFi at specific times. For example, adding `0 0 * * * nmcli radio wifi off` will turn off your WiFi at midnight, and `0 6 * * * nmcli radio wifi on` will turn it back on at 6 AM. Just a note though, some people find that they have to really commit to not turning the WiFi back on — it’s all about willpower! 😂
Haha, I feel you on that! But hey, at least it’s a start!