You are not logged in.
I want to connect to my college wifi through command. So I'm using nmcli. I've created a configuration file /etc/NetworkManager/system-connections/library.conf with the following content:
[802-11-wireless]
mac-address=0c:84:dc:xx:xx:xx
#ssid=
mode=infrastructure
#security=802-11-wireless-security
#[802-11-wireless-security]
#key-mgmt=wpa-psk
#psk=YOUR PASSWORD
[connection]
id=library
uuid=60268d4e-8124-4193-a539-832276025ce2
type=802-11-wireless
timestamp=0
autoconnect=true
[ipv4]
method=manual
address=212.224.xxxx.xxx
gateway=212.224.xxx.xxx
netmask=255.255.xxx.xxx
dns=8.8.8.8
auto-dns=212.224.xxx.xxx
[ipv6]
method=auto
The wifi connection is open and have to manually set the ipv4 setting as follows
IP: 212.224.xxx.xxx
subnet mask: 255.255.xxx.xxx
gateway: 212.224.xxx.xxx
DNS: 8.8.8.8
Alter: 212.224.xxx.xxx
I've changed the permission of the file /etc/NetworkManager/system-connections/library.conf to 0600.
When I type "nmcli connection list" I'm able to get the connection in the list but when I type "nmcli con up id library" it shows the following error:
Error: Unknown connection: library.
What am I doing wrong ?
Last edited by ansh_kumar (2014-03-22 14:25:52)
Offline
I've found the solution myself.
Here is the configuration file which was wrong previously
etc/NetworkManager/system-connections/@LIBRARY
[connection]
id=@LIBRARY
uuid=8f3d0e25-7965-4cb7-acb4-bb7c00a5c46e
type=802-11-wireless
permissions=user:ansh:;
[802-11-wireless]
ssid=@LIBRARY
mode=infrastructure
mac-address=74:E5:xx:xx:xx:xx
cloned-mac-address=0C:84:xx:xx:xx:xx
[ipv6]
method=auto
[ipv4]
method=manual
dns=8.8.8.8;
dns-search=212.xxx.xxx.xx;
address1=212.xxx.xxx.xx/24,212.xxx.xxx.xx
may-fail=false
Offline
netctl is also a good tool so here is the configuration file for wifi static:
/etc/netctl/@LIBRARY
Description='Automatically generated profile by wifi-menu'
Interface=wlo1
Connection=wireless
Security=none
ESSID=@LIBRARY
IP=static
Address='212.xxx.xxx.xxx/24'
Gateway='212.xxx.xxx.xx'
DNS='8.8.8.8'
DNSSearch='212.xxx.xxx.xx'
Last edited by ansh_kumar (2014-03-22 14:22:55)
Offline
If you want to connect with nmcli, why did you go through the process or hand writing the configuration files. Doesn't that kind of defeat the purpose of nmcli?
Offline
Actually previously I was using applets but they were not good. Always had some type of problem.I've not manually written the configuration file it's generated by the applet except the netctl profile(it's written by me).
Last edited by ansh_kumar (2014-03-22 16:28:56)
Offline
If you still have interest in using NetworkManager's nmcli, see the nmcli man page. In partiulcar, you should check out the examples at towards the bottom. It isn't the easiest command line client, but it does have tab completion which can help.
Offline
Some more information on nmcli: http://fedoraproject.org/wiki/Networking/CLI
Alternatively you can have a look at 'nmtui': http://www.phoronix.com/scan.php?page=n … px=MTU0Mjg
Offline
@orschiro, I think that the nmtui needs to be explicity enabled in the ./configure line when building. As far as I know the Arch package does not (yet?) provide this. I am fairly certain that it would also mean additional dependencies for the package as well.
Offline