I normally connect to internet through my mobile phone's SIM card. Its a GSM network.

To connect to internet in GUI manner I go to notification bar, click on network icon, and click on connections name. After connecting the network icon changes to indicate that I have connected to internet.

if Your ISP is using PAP authentication so You must add user name and password provided by my ISP at the end of your /etc/ppp/pap-secrets file.

sudo nano /etc/ppp/pap-secrets

If your Internet service provider is using CHAP authentication do the same but use /etc/ppp/chap-secrets file.

Also we must decide on remote name identification string that will be used in the next steps to instruct pppd to use right pap or chap credentials.

I will use string “ispname” here. So here’s what I have placed at the end of my /etc/ppp/pap-secrets file (place your user name, password and string of your choice here instead of my “ispusername”, “isppassword” and “ispname”):

"ispusername" "ispname" "isppassword"

If your ISP isn’t using authentication and you don’t need to provide name and password to connect to Internet you can skip this step altogether.

As a next step we must create so called peers file that will be used by pppd to dial chat script created in the first step using credentials stored in the second step. I will call my peers file “ispname” and place it into /etc/ppp/peers directory:

This is basic configuration to get you online. To dial your connection you would use sudo pon ispname and to disconnect you would use sudo poff ispname where “ispname” is you peers file name. To be able to dial without sudo you need to add your self to “dialout” group:

sudo adduser $USER dialout

Further you might want to create interface for your pppd connection so you could control your GSM mobile broadband connection using “ifup” and “ifdown” commands and/or dial automatically when your PC boot. You would achieve this by adding something like this to your /etc/network/interfaces file:

The GUI is a front end to Network Manager, which is a daemon. You can ask the daemon to make a connection using the command line as well. This way, your configuration is shared between the GUI and command line methods.

The tool you can use for this is nmcli, which is installed with network-manager so should be present on your system already. To connect to a network called network-name in your GUI, type nmcli con up id network-name on the command line. Similarly, nmcli con down id network-name will disconnect. If the GUI (nm-applet) is running, then you will see its displayed status change accordingly.

See the nmcli manpage for further details. Manpages on newer releases include examples as well, although I can't find an online link to this.

Enter the Username and Password if required (leave blank if it's not required) . Also provide the Phone number to dial. For eg: *91#,#777 ...etc
If the phone is connected using USB, the Modem value will most probably be /tty/USB0
or something similar.