FG
💻 Software

How do I set the priority of network connections in Ubuntu?

Fresh5 days ago
Mar 15, 2026205285 views
Confidence Score1%
1%

Problem

If a Ubuntu 11.04 machine is connected to WiFi and 3G simultaneously, how do I set the priority to let the applications (browser etc.) to use WiFi first? If that's not available, it should use the 3G. Basically, I would like to set the order in which the network connections are used. Edit: I am looking for an easier approach which would be useful for those who are just comfortable and not experts in Ubuntu/Linux.

Unverified for your environment

Select your OS to check compatibility.

1 Fix

Canonical Fix
Unverified Fix
New Fix – Awaiting Verification

Fix for: How do I set the priority of network connections in Ubuntu?

Low Risk

I am surprised no one has mentioned the simplest command to do this: . It can be installed using . This command can be used to change the metric of any interface. The interface with lower metric is preferred for Internet. To use this, first see the metrics using command: Here, has lower metric, so it will be preferred over . If you want to prefer , then lower its metric: Now, the routing table would look like: Now Linux will be using for Internet. The change will be reflected immediately.

Awaiting Verification

Be the first to verify this fix

Sign in to verify this fix

Environment