diff options
| author | Vito Graffagnino <vito@graffagnino.xyz> | 2020-09-08 18:10:49 +0100 |
|---|---|---|
| committer | Vito Graffagnino <vito@graffagnino.xyz> | 2020-09-08 18:10:49 +0100 |
| commit | 3b0142cedcde39e4c2097ecd916a870a3ced5ec6 (patch) | |
| tree | 2116c49a845dfc0945778f2aa3e2118d72be428b /.cheat/cheat/nmcli | |
| parent | 8cc927e930d5b6aafe3e9862a61e81705479a1b4 (diff) | |
Added the relevent parts of the .config directory. Alss add ssh config
Diffstat (limited to '.cheat/cheat/nmcli')
| -rw-r--r-- | .cheat/cheat/nmcli | 52 |
1 files changed, 52 insertions, 0 deletions
diff --git a/.cheat/cheat/nmcli b/.cheat/cheat/nmcli new file mode 100644 index 0000000..cd38bf4 --- /dev/null +++ b/.cheat/cheat/nmcli @@ -0,0 +1,52 @@ +# Desc: Command line interface to NetworkManager + +# Connect to a wireless access point - Parameters: +# <wiface> -- the name of your wireless interface +# <ssid> -- the SSID of the access point +# <pass> -- the WiFi password +nmcli d wifi connect <ssid> password <pass> iface <wiface> + +# Disconnect from WiFi - Parameters: +# <wiface> -- the name of your wireless interface +nmcli d wifi disconnect iface <wiface> + +# Get WiFi status (enabled / disabled) +nmcli radio wifi + +# Enable / Disable WiFi +nmcli radio wifi <on|off> + +# Show all available WiFi access points +nmcli dev wifi list + +# Refresh the available WiFi connection list +nmcli dev wifi rescan + +# Show all available connections +nmcli con + +# Show only active connections +nmcli con show --active + +# Review the available devices +nmcli dev status + +# Add a dynamic ethernet connection - parameters: +# <name> -- the name of the connection +# <iface_name> -- the name of the interface +ncmli con add type ethernet con-name <name> ifname <iface_name> + +# Bring up the ethernet connection +nmcli con up <name> + +# Bring Wifi radio up, connect to SSID, switch on vpn +nmcli radio wifi on +nmcli con up <SSID> +vpn_<loc>_up + + +# Switch off vpn, disconnect from SSID, bring Wifi radio down +vpn_<loc>_dn +nmcli con down <SSID> +nmcli radio wifi off + |
