Add nmcli tutorial
This commit is contained in:
parent
e0ab46c827
commit
be25f2fa97
|
@ -34,7 +34,7 @@ How to -safely- migrate to [[https://www.fsf.org][free software]] (free as in fr
|
|||
* [[./doc/luakit_browser.org][Luakit browser: how to use "adblock"]]
|
||||
* [[./doc/set_luakit_default.org][Set a browser as default: an example with luakit]]
|
||||
* [[./doc/user_tor_luakit.org][Use tor with luakit browser]]
|
||||
|
||||
* [[./doc/nmcli_command.org][`nmcli`: Connect to internet from terminal]]
|
||||
|
||||
** Hardware
|
||||
|
||||
|
|
|
@ -0,0 +1,78 @@
|
|||
#+date: 2023-03-08
|
||||
#+options: toc:nil
|
||||
|
||||
* nmcli command
|
||||
|
||||
`nmcli` is a terminal functionality to use network manager and report network status.
|
||||
|
||||
Some of the common uses on connections are[fn:1]:
|
||||
|
||||
- create
|
||||
- display
|
||||
- edit
|
||||
- delete
|
||||
- activate
|
||||
- deactivate
|
||||
|
||||
|
||||
To check the status of the network use:
|
||||
|
||||
#+begin_src sh
|
||||
nmcli general
|
||||
#+end_src
|
||||
|
||||
#+RESULTS:
|
||||
| STATE | CONNECTIVITY | WIFI-HW | WIFI | WWAN-HW | WWAN |
|
||||
| connected | full | enabled | enabled | missing | disabled |
|
||||
|
||||
|
||||
To check the connections and devices use:
|
||||
|
||||
#+begin_example sh
|
||||
nmcli connection show
|
||||
#+end_example
|
||||
|
||||
|
||||
#+begin_example sh
|
||||
nmcli device show
|
||||
#+end_example
|
||||
|
||||
** List and connect to wifi
|
||||
|
||||
First, list the devices that area available for wifi connection:
|
||||
|
||||
#+begin_src sh
|
||||
nmcli dev wifi list
|
||||
#+end_src
|
||||
|
||||
This will output some information about wifi in a table:
|
||||
|
||||
#+RESULTS:
|
||||
| IN-USE | BSSID | SSID | MODE | CHAN | RATE | SIGNAL | BARS | SECURITY |
|
||||
|
||||
From here you could use the "BSSID" or "SSID" to connect to wifi
|
||||
|
||||
Connect to a wifi:
|
||||
|
||||
Use the following command and include the wifi BSSID:
|
||||
|
||||
#+begin_example sh
|
||||
nmcli dev wifi connect A4:D4:B2:6A:D9:77
|
||||
#+end_example
|
||||
|
||||
In case you need to include the password for wifi, use:
|
||||
|
||||
#+begin_example sh
|
||||
nmcli --ask dev wifi connect network-ssid
|
||||
#+end_example
|
||||
|
||||
|
||||
** References
|
||||
|
||||
- [[https://www.makeuseof.com/connect-to-wifi-with-nmcli/][Connect to wifi using `nmcli`]]
|
||||
|
||||
* Footnotes
|
||||
|
||||
[fn:1] Check the manual on the terminal: `info nmcli` or [[https://manpages.org/nmcli][here]]
|
||||
|
||||
|
Loading…
Reference in New Issue