I need to set the metric 0 for the wlan network

$ ifconfig 

wlp2s0 ....

if I use the command:

sudo ifmetric wlp2s0 1

Everything works until the system reboots.

already tried to configure the file: /etc/network/interfaces

auto wlp2s0
iface wlp2s0 inet dhcp
  metric 0

failed, when the system starts the network wlp2s0 is disabled.

How can I make this permanent?

I need to leave the wireless (wlp2s0) network with priority 0.

  • Can you add @reboot ifmetric wlp2s0 1 to root's crontab? sudo crontab -e. – SHawarden Jul 1 at 21:30
  • @SHawarden does not work, where there is no crontab and when restart does not apply this metric – 2kBIT Jul 2 at 11:25
  • I want to set the wifi card to metric 1. Any wireless network that connect will have priority. – 2kBIT Jul 2 at 12:43

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.