LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Blogs > kleinde66
User Name
Password

Notices


Rate this Entry

switching networks arco & cbpp11

Posted 12-28-2022 at 09:48 AM by kleinde66
Updated 12-28-2022 at 11:18 AM by kleinde66

good day
i have two WiFi networks one is exceed the other is starlink.
usually i work from my laptop so switching networks is a pain.
until now !

Code:
#!/bin/bash
#
#
nmcli c up uuid 9ae4dfae-fghj-4c14-qwer-a52e5c64619a   #<<<< dd-wrt_24ghz  
exit 0

Code:
#!/bin/bash
#
#
nmcli c up uuid 653db75c-zxcv-47c6-8320-d81e0eb6753b   #<<<< starlink-001
exit 0

above in the two code blocks are the workings, when either one of the bash scripts are run it will
switch to that network.


Code:
$nmcli con show
will give you list of you network connections.

Code:
NAME                UUID                                  TYPE      DEVICE
starlink-001        653db75c-xcvb-47c6-hjkl-d81e0eb6753b  wifi      wlp6s0
dd-wrt_24ghz        9ae4dfae-9062-sdfg-bc05-a52e5c64619a  wifi      --
Wired connection 1  0fefdb06-wert-3220-8eca-1532f0b2a578  ethernet  --
in your two bash scripts you create, just replace the uuid's from nmcli con show.
depending on you system, i use openbox just creat a launcher.

be advised!!!!!
if you change networks and run thunar sftp://xxx.xxx.xxx.xxx/
then change to another network without unmounting thunar sftp://xxx.xxx.xxx.xxx/.
thunar will not start. vnc works without a problem.
remember unmount you sftp before changing networks.
Posted in Uncategorized
Views 391 Comments 1
« Prev     Main     Next »
Total Comments 1

Comments

  1. Old Comment
    Very cool. Will save this. The closest I came to using nmcli was mntui, which has an ncurses interface.
    Posted 01-10-2023 at 11:18 AM by jr_bob_dobbs jr_bob_dobbs is offline
 

  



All times are GMT -5. The time now is 05:54 PM.

Main Menu
Advertisement
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration