On Fri, Feb 21, 2020 at 02:10:49PM -0700, Raymond, David wrote:
> I have a problem when I have two wifi services available, say, a hotel
> wifi and my cellphone hotspot.  Suppose I put the hotel wifi in my
> hostname.xxx file and run sh /etc/netstart and I don't like the
> results.  Removing the hotel wifi from the hostname file, replacing it
> with my hotspot wifi, and rerunning sh /etc/netstart results in the
> computer trying to connect with the hotel wifi again, even though this
> connection is no longer in the hostname file.  If I then reboot the
> computer and rerun sh /etc/netstart, it connects with the hotspot wifi
> as desired.
> 
> My question is whether there is a way to purge the non-desired wifi
> connection without rebooting the computer.
> 

Hi David,

In cases like this, I typically don't update my hostname.xxx file and
instead run `ifconfig` by hand.

For example to remove ESSID foo:
  ifconfig -join foo

Or to remove all known networks:
  ifconfig -joinlist

The `ifconfig` manpage explains this.

Regards
Tim

Reply via email to