From Fedora Project Wiki
(Created page with "==Description== nmcli is tool that allows NetworkManager management from command line. This tool is useful in those cases in which a graphical frontend is not available. ==Co...")
 
No edit summary
Line 7: Line 7:


Connect to a configured connection by name or uuid
Connect to a configured connection by name or uuid
<pre>nmcli con up id <name></pre>
<pre>nmcli con up id <connection id></pre>
<pre>nmcli con up uuid <uuid></pre>
<pre>nmcli con up uuid <uuid></pre>


Disconnection by name or uuid
Disconnection by name or uuid
<pre>nmcli con down id <name></pre>
<pre>nmcli con down id <connection id></pre>
<pre>nmcli con down uuid <uuid></pre>
<pre>nmcli con down uuid <uuid></pre>


Line 35: Line 35:


==Modify an already configured connection==
==Modify an already configured connection==
Open with a text editor the configuration file of the connection. The file is located in "/etc/sysconfig/network-scripts/" under the name of "ifcfg-<connection id>"
Open with a text editor the configuration file of the connection. The file is located in "/etc/sysconfig/network-scripts/" under the name of "ifcfg-<connection name>"


===Connect automatically to that connection===
===Connect automatically to that connection===
Line 48: Line 48:


Edit or add the line "MACADDR=<spoofed MAC>". Don't change the line "HWADDR=<real MAC>" to spoof your MAC address.
Edit or add the line "MACADDR=<spoofed MAC>". Don't change the line "HWADDR=<real MAC>" to spoof your MAC address.


Finally save the file and to apply changes to an already active connection execute
Finally save the file and to apply changes to an already active connection execute
Line 55: Line 56:


To modify a connection password open with a text editor and edit the file "keys-<connection id>" located in "/etc/sysconfig/network-scripts/". The password is stored in plain text
To modify a connection password open with a text editor and edit the file "keys-<connection id>" located in "/etc/sysconfig/network-scripts/". The password is stored in plain text
==Notes==
nmcli maybe contain some bugs and lack some features graphical tools for NetworkManager have.
To see available options for nmcli deeper
<pre>man nmcli</pre>
==Links==
[http://wiki.gnome.org/NetworkManager/SystemSettings]

Revision as of 18:47, 20 November 2013

Description

nmcli is tool that allows NetworkManager management from command line. This tool is useful in those cases in which a graphical frontend is not available.

Connect/disconnect to an already configured connection

List already configured connections

nmcli con list

Connect to a configured connection by name or uuid

nmcli con up id <connection id>
nmcli con up uuid <uuid>

Disconnection by name or uuid

nmcli con down id <connection id>
nmcli con down uuid <uuid>

Network interfaces

List available devices and their status

nmcli dev status

Disconnect an interface

nmcli dev disconnect iface <interface>

Wifi

Get Wifi status

nmcli nm wifi

Turn wifi on or off

nmcli nm wifi <on|off>

List available access points(AP) to connect to

nmcli dev wifi list

Create a new connection to an AP

nmcli dev wifi connect <(B)SSID>

Modify an already configured connection

Open with a text editor the configuration file of the connection. The file is located in "/etc/sysconfig/network-scripts/" under the name of "ifcfg-<connection name>"

Connect automatically to that connection

Edit to or add the line "ONBOOT=yes"

Make the connection available only to one user

Edit or add the line "USERS=<username>"

Spoof MAC address

Edit or add the line "MACADDR=<spoofed MAC>". Don't change the line "HWADDR=<real MAC>" to spoof your MAC address.


Finally save the file and to apply changes to an already active connection execute

nmcli con up id <connection id>

Edit a connection password

To modify a connection password open with a text editor and edit the file "keys-<connection id>" located in "/etc/sysconfig/network-scripts/". The password is stored in plain text

Notes

nmcli maybe contain some bugs and lack some features graphical tools for NetworkManager have.

To see available options for nmcli deeper

man nmcli

Links

[1]