Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

I have a system without X display and I want to use nmcli to configure my cell modem to connect to a certain apn. I can get it going with this modem just fine on Ubuntu (with X) and I would like to achieve the same now on the command line. How can I setup the connection?

so far I get this:

# nmcli dev status

** (process:2379): WARNING **: Could not initialize NMClient /org/freedesktop/NetworkManager: Permissions request failed: GDBus.Error:org.freedesktop.DBus.Error.ServiceUnknown: The name org.freedesktop.PolicyKit1 was not provided by any .service files
DEVICE     TYPE              STATE        
ttyUSB1    gsm               disconnected 
eth0       802-3-ethernet    connected 
share|improve this question

1 Answer 1

Assuming you have a more recent version than 0.9.6:

$ nmcli --version
nmcli tool, version 0.9.8.8-2.fc19

You can create devices like so via the command line using the dev commands within nmcli:

excerpt from nmcli man page

   nmcli dev wifi con "Cafe Hotspot 1" password caffeine name "My cafe"

          creates a new connection named "My cafe" and then connects it to 
          "Cafe Hotspot 1" SSID using "caffeine" password. This is mainly 
          useful when connecting to "Cafe Hotspot 1" for the first time. 
          Next time, it is better to use 'nmcli con up id "My cafe"' so that 
          the existing connection profile can be used and no additional is 
          created.

However creating connections is still a very new feature for nmcli, and isn't even listed in my F19's version of NetworkManager (0.9.8.8). Looking into F20 and RHEL7 Beta I noticed these examples which would seem to indicate that the option might be coming soon, 2.4. Using the NetworkManager Command Line Tool, nmcli.

$ nmcli connection modify id 'MyCafe' 802-11-wireless.mtu 1350

So perhaps if your distro has a newer version of NetworkManager you could add it like that.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.